Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2FD30200B89 for ; Tue, 6 Sep 2016 22:15:52 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2EF1B160ACE; Tue, 6 Sep 2016 20:15:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 597E8160ACF for ; Tue, 6 Sep 2016 22:15:51 +0200 (CEST) Received: (qmail 12544 invoked by uid 500); 6 Sep 2016 20:15:50 -0000 Mailing-List: contact commits-help@quickstep.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@quickstep.incubator.apache.org Delivered-To: mailing list commits@quickstep.incubator.apache.org Received: (qmail 12535 invoked by uid 99); 6 Sep 2016 20:15:50 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2016 20:15:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 2C93218046D for ; Tue, 6 Sep 2016 20:15:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id JUR-tZ7jVRBS for ; Tue, 6 Sep 2016 20:15:48 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with SMTP id AB6266121F for ; Tue, 6 Sep 2016 20:15:41 +0000 (UTC) Received: (qmail 11158 invoked by uid 99); 6 Sep 2016 20:15:40 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2016 20:15:40 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 42EFCE0579; Tue, 6 Sep 2016 20:15:40 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hbdeshmukh@apache.org To: commits@quickstep.incubator.apache.org Date: Tue, 06 Sep 2016 20:16:25 -0000 Message-Id: <462cb99245e0456682936a2dc47bc360@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [48/73] [abbrv] incubator-quickstep git commit: reinterpreted byte to SpinMutex before locking. This removes the need to have an additional function accepting a pointer in the SpinMutex class archived-at: Tue, 06 Sep 2016 20:15:52 -0000 reinterpreted byte to SpinMutex before locking. This removes the need to have an additional function accepting a pointer in the SpinMutex class Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/3c4e2ab0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/3c4e2ab0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/3c4e2ab0 Branch: refs/heads/partitioned-aggregation Commit: 3c4e2ab038c7ffea35030502419764c7f21ba616 Parents: e269e03 Author: rathijit Authored: Sun Aug 14 19:54:50 2016 -0500 Committer: Harshad Deshmukh Committed: Tue Sep 6 10:39:59 2016 -0500 ---------------------------------------------------------------------- storage/FastHashTable.hpp | 12 ++++++------ threading/SpinMutex.hpp | 2 -- 2 files changed, 6 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/3c4e2ab0/storage/FastHashTable.hpp ---------------------------------------------------------------------- diff --git a/storage/FastHashTable.hpp b/storage/FastHashTable.hpp index 8d8d82b..c659a20 100644 --- a/storage/FastHashTable.hpp +++ b/storage/FastHashTable.hpp @@ -1900,7 +1900,7 @@ bool FastHashTable resize_lock(resize_shared_mutex_); uint8_t *value = upsertCompositeKeyInternalFast(key, init_value_ptr, variable_size); if (value != nullptr) { - SpinMutex lock(value); + SpinMutexLock lock(*(reinterpret_cast(value))); for (unsigned int k = 0; k < handles_.size(); ++k) { handles_[k]->mergeStatesFast(source_state + payload_offsets_[k], value + payload_offsets_[k]); } @@ -1914,7 +1914,7 @@ bool FastHashTable(value))); for (unsigned int k = 0; k < handles_.size(); ++k) { handles_[k]->mergeStatesFast(source_state + payload_offsets_[k], value + payload_offsets_[k]); } @@ -2017,7 +2017,7 @@ bool FastHashTable(value))); for (unsigned int k = 0; k < handles_.size(); ++k) { local.clear(); if (argument_ids[k].size()) { @@ -2044,7 +2044,7 @@ bool FastHashTable(value))); for (unsigned int k = 0; k < handles_.size(); ++k) { local.clear(); if (argument_ids[k].size()) { @@ -2170,7 +2170,7 @@ bool FastHashTable(value))); for (unsigned int k = 0; k < handles_.size(); ++k) { local.clear(); if (argument_ids[k].size()) { @@ -2201,7 +2201,7 @@ bool FastHashTable(value))); for (unsigned int k = 0; k < handles_.size(); ++k) { local.clear(); if (argument_ids[k].size()) { http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/3c4e2ab0/threading/SpinMutex.hpp ---------------------------------------------------------------------- diff --git a/threading/SpinMutex.hpp b/threading/SpinMutex.hpp index 106ef13..5ed1405 100644 --- a/threading/SpinMutex.hpp +++ b/threading/SpinMutex.hpp @@ -44,8 +44,6 @@ class SpinMutex { SpinMutex() : locked_(false) { } - explicit SpinMutex(uint8_t *ptr): locked_(*ptr) {} - /** * @note This call does NOT yield when contended. SpinMutex is intended * mainly for cases where locks are held briefly and it is better to