[06/24] thrift git commit: THRIFT-3038 clean up remaining volatile issues Client: C++
THRIFT-3038 clean up remaining volatile issues Client: C++ This closes #1129 Project: http://git-wip-us.apache.org/repos/asf/thrift/repo Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/c544975d Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/c544975d Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/c544975d Branch: refs/heads/0.10.0 Commit: c544975d910534b753dc1c4480c09042f8ba07af Parents: df89913 Author: James E. King, IIIAuthored: Sun Nov 13 12:00:37 2016 -0500 Committer: James E. King, III Committed: Sun Nov 13 12:00:37 2016 -0500 -- lib/cpp/src/thrift/concurrency/Mutex.cpp | 5 ++--- lib/cpp/src/thrift/transport/TFileTransport.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/thrift/blob/c544975d/lib/cpp/src/thrift/concurrency/Mutex.cpp -- diff --git a/lib/cpp/src/thrift/concurrency/Mutex.cpp b/lib/cpp/src/thrift/concurrency/Mutex.cpp index d9921aa..e5e50f7 100644 --- a/lib/cpp/src/thrift/concurrency/Mutex.cpp +++ b/lib/cpp/src/thrift/concurrency/Mutex.cpp @@ -37,11 +37,10 @@ namespace concurrency { #ifndef THRIFT_NO_CONTENTION_PROFILING -static sig_atomic_t mutexProfilingSampleRate = 0; +static int32_t mutexProfilingCounter = 0; +static int32_t mutexProfilingSampleRate = 0; static MutexWaitCallback mutexProfilingCallback = 0; -volatile static sig_atomic_t mutexProfilingCounter = 0; - void enableMutexProfiling(int32_t profilingSampleRate, MutexWaitCallback callback) { mutexProfilingSampleRate = profilingSampleRate; mutexProfilingCallback = callback; http://git-wip-us.apache.org/repos/asf/thrift/blob/c544975d/lib/cpp/src/thrift/transport/TFileTransport.h -- diff --git a/lib/cpp/src/thrift/transport/TFileTransport.h b/lib/cpp/src/thrift/transport/TFileTransport.h index d7fa556..c926c7c 100644 --- a/lib/cpp/src/thrift/transport/TFileTransport.h +++ b/lib/cpp/src/thrift/transport/TFileTransport.h @@ -349,7 +349,7 @@ private: // conditions used to block when the buffer is full or empty Monitor notFull_, notEmpty_; - volatile bool closing_; + bool closing_; // To keep track of whether the buffer has been flushed Monitor flushed_;
thrift git commit: THRIFT-3038 clean up remaining volatile issues Client: C++
Repository: thrift Updated Branches: refs/heads/master df89913b8 -> c544975d9 THRIFT-3038 clean up remaining volatile issues Client: C++ This closes #1129 Project: http://git-wip-us.apache.org/repos/asf/thrift/repo Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/c544975d Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/c544975d Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/c544975d Branch: refs/heads/master Commit: c544975d910534b753dc1c4480c09042f8ba07af Parents: df89913 Author: James E. King, IIIAuthored: Sun Nov 13 12:00:37 2016 -0500 Committer: James E. King, III Committed: Sun Nov 13 12:00:37 2016 -0500 -- lib/cpp/src/thrift/concurrency/Mutex.cpp | 5 ++--- lib/cpp/src/thrift/transport/TFileTransport.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/thrift/blob/c544975d/lib/cpp/src/thrift/concurrency/Mutex.cpp -- diff --git a/lib/cpp/src/thrift/concurrency/Mutex.cpp b/lib/cpp/src/thrift/concurrency/Mutex.cpp index d9921aa..e5e50f7 100644 --- a/lib/cpp/src/thrift/concurrency/Mutex.cpp +++ b/lib/cpp/src/thrift/concurrency/Mutex.cpp @@ -37,11 +37,10 @@ namespace concurrency { #ifndef THRIFT_NO_CONTENTION_PROFILING -static sig_atomic_t mutexProfilingSampleRate = 0; +static int32_t mutexProfilingCounter = 0; +static int32_t mutexProfilingSampleRate = 0; static MutexWaitCallback mutexProfilingCallback = 0; -volatile static sig_atomic_t mutexProfilingCounter = 0; - void enableMutexProfiling(int32_t profilingSampleRate, MutexWaitCallback callback) { mutexProfilingSampleRate = profilingSampleRate; mutexProfilingCallback = callback; http://git-wip-us.apache.org/repos/asf/thrift/blob/c544975d/lib/cpp/src/thrift/transport/TFileTransport.h -- diff --git a/lib/cpp/src/thrift/transport/TFileTransport.h b/lib/cpp/src/thrift/transport/TFileTransport.h index d7fa556..c926c7c 100644 --- a/lib/cpp/src/thrift/transport/TFileTransport.h +++ b/lib/cpp/src/thrift/transport/TFileTransport.h @@ -349,7 +349,7 @@ private: // conditions used to block when the buffer is full or empty Monitor notFull_, notEmpty_; - volatile bool closing_; + bool closing_; // To keep track of whether the buffer has been flushed Monitor flushed_;