diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2017-11-03 07:49:16 -0400 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2018-08-31 10:00:38 -0400 |
commit | 190bf62be1214b072513c7fd7e01cc191723967c (patch) | |
tree | aeece6f0d62abfa11a70875d120350f0374cabee /src/test/sync_tests.cpp | |
parent | 385ad110400bc9646dcf2e38b64b7080182a7344 (diff) |
scripted-diff: Small locking rename
Call sync.h primitives "locks" and "mutexes" instead of "blocks" and "waitable
critical sections" to match current coding conventions and c++11 standard
names.
This PR does not rename the "CCriticalSection" class (though this could be done
as a followup) because it is used everywhere and would swamp the other changes
in this PR. Plain mutexes should mostly be preferred instead of recursive
mutexes in new code anyway.
-BEGIN VERIFY SCRIPT-
set -x
set -e
ren() { git grep -l $1 | xargs sed -i s/$1/$2/; }
ren CCriticalBlock UniqueLock
ren CWaitableCriticalSection Mutex
ren CConditionVariable std::condition_variable
ren cs_GenesisWait g_genesis_wait_mutex
ren condvar_GenesisWait g_genesis_wait_cv
perl -0777 -pi -e 's/.*typedef.*condition_variable.*\n\n?//g' src/sync.h
-END VERIFY SCRIPT-
Diffstat (limited to 'src/test/sync_tests.cpp')
-rw-r--r-- | src/test/sync_tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/sync_tests.cpp b/src/test/sync_tests.cpp index 539e2ff3ab..df0380546e 100644 --- a/src/test/sync_tests.cpp +++ b/src/test/sync_tests.cpp @@ -41,7 +41,7 @@ BOOST_AUTO_TEST_CASE(potential_deadlock_detected) CCriticalSection rmutex1, rmutex2; TestPotentialDeadLockDetected(rmutex1, rmutex2); - CWaitableCriticalSection mutex1, mutex2; + Mutex mutex1, mutex2; TestPotentialDeadLockDetected(mutex1, mutex2); #ifdef DEBUG_LOCKORDER |