Avoid locking mutexes that are already held by the same thread. These are reentrant mutexes, but still no need to lock them more than once per thread :-)
Backport of Bitcoin Core PR11762
https://github.com/bitcoin/bitcoin/pull/11762
Differential D4145
Avoid locking mutexes that are already held by the same thread fpelliccioni on Sep 24 2019, 12:35. Authored by Tags None Subscribers None
Details
Avoid locking mutexes that are already held by the same thread. These are reentrant mutexes, but still no need to lock them more than once per thread :-) Backport of Bitcoin Core PR11762
CXX=clang++ CC=clang cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug ninja check
Diff Detail
Event TimelineComment Actions The test plan is not apropriate. You need to test with clang to make sure the thread anotation are repsected, (gcc doesn't support this) and run the test suite on a debug build to check that AssertLockHeld doesn't trigger. |