New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
backport: remove boost from sync.h/.cpp #3520
base: 1.15.0-dev
Are you sure you want to change the base?
Conversation
…o std from boost. Commit 1. This code was written by @TheBlueMatt in the following branch: * https://github.com/TheBlueMatt/bitcoin/commits/2017-08-test-10923 This commit message was written by me (@practicalswift) who also squashed @TheBlueMatt's commits into one and tried to summarize the changes made. Commit 2. Remove boost include. Remove boost mentions in comments. Cherry-picked from: 7e319d6
Cherry-picked from: bba9bd0
Cherry-picked from: f7f7e2c
Cherry-picked from: 41b88e9
Move AnnotatedMixin closer to where it's used, and after the DEBUG_LOCKORDER function declarations so it can call them. Cherry-picked from: ba1f095
They should also work with any other mutex type which std::unique_lock supports. There is no change in behavior for current code that calls these macros with CCriticalSection mutexes. Cherry-picked from: 1382913
Instead of std::unique_lock. Cherry-picked from: 9c4dc59
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- Cherry-picked from: 190bf62
I think this is a (partial) duplicate of #3313? |
It appears so. My apologies. I will rework this tomorrow. |
Perhaps I can just backport the unit test from here into there, and unblock #3313 that way? Then you can focus on the RNG stuff and not bother with this one. 😊 |
Sounds good to me. About to catch some 💤 Will address anything further en la manana. ❤️✌️ |
Consolidation of multiple cherry-picks with regards to sync.h and sync.cpp.