sync.h: Add GlobalMutex type
Summary:
And convert global Mutexes to GlobalMutexes:
-BEGIN VERIFY SCRIPT- sed -i -E -e '/^([a-z]+ )?Mutex [a-z]/ s/Mutex/GlobalMutex/' $(git grep -lE '^([a-z]+ )?Mutex [a-z]') -END VERIFY SCRIPT-
This is a partial backport of core#24931
https://github.com/bitcoin/bitcoin/pull/24931/commits/a559509a0b8cade27199740212d7b589f71a0e3b
https://github.com/bitcoin/bitcoin/pull/24931/commits/d2852917eecad6ab422a7b2c9892d351a7f0cc96
Depends on D14892
Test Plan:
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ninja all check-all`
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14893