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:
parent
3a809446b3
commit
de9b5dbca3
1 changed files with 3 additions and 0 deletions
|
@ -311,6 +311,9 @@ struct SCOPED_LOCKABLE LockAnnotation
|
||||||
template <typename Mutex>
|
template <typename Mutex>
|
||||||
explicit LockAnnotation(Mutex& mutex) EXCLUSIVE_LOCK_FUNCTION(mutex)
|
explicit LockAnnotation(Mutex& mutex) EXCLUSIVE_LOCK_FUNCTION(mutex)
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG_LOCKORDER
|
||||||
|
AssertLockHeld(mutex);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
~LockAnnotation() UNLOCK_FUNCTION() {}
|
~LockAnnotation() UNLOCK_FUNCTION() {}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue