Issue 881875 tracks adding minimal annotations to base::Lock and base::AutoLock that would enable adding GUARDED_BY annotations and enforcements for fields protected by base::AutoLock. Such minimal annotations are insufficient for
1. base::AutoLock(..., base::AutoLock::AlreadyAcquired()) constructor which will trigger compiler errors until base::Lock::Try is annotated with EXCLUSIVE_TRYLOCK_FUNCTION.
2. Analysing and enforcing direct usage of base::Lock methods.
Let's use this bug to track annotating Lock methods as follows:
void Acquire() EXCLUSIVE_LOCK_FUNCTION();
void Release() UNLOCK_FUNCTION();
bool Try() EXCLUSIVE_TRYLOCK_FUNCTION(true);
void AssertAcquired() const ASSERT_EXCLUSIVE_LOCK();
Comment 1 by lukasza@chromium.org
, Sep 12Status: Duplicate (was: Untriaged)