mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-06 16:36:57 +02:00
Make sure the compile-time locking promises given via LockAnnotation:s hold also in practice at runtime (ifdef DEBUG_LOCKORDER)
This commit is contained in:
@ -311,6 +311,9 @@ struct SCOPED_LOCKABLE LockAnnotation
|
||||
template <typename Mutex>
|
||||
explicit LockAnnotation(Mutex& mutex) EXCLUSIVE_LOCK_FUNCTION(mutex)
|
||||
{
|
||||
#ifdef DEBUG_LOCKORDER
|
||||
AssertLockHeld(mutex);
|
||||
#endif
|
||||
}
|
||||
~LockAnnotation() UNLOCK_FUNCTION() {}
|
||||
};
|
||||
|
Reference in New Issue
Block a user