Lines Matching refs:locked
43 balance -= amount; // OK. Caller must have locked mu.
49 withdrawImpl(amount); // OK. We've locked mu.
65 Because the caller is assumed to have locked ``mu``, it is safe to modify
119 capabilities (e.g. the set of mutexes that it has locked.) These act like keys
249 myObject.doSomething(); // Warning, mu is not locked.
438 a = 0; // Warning, mu is not locked.
443 a = 0; // Warning, mu is not locked.
587 (Q) "*Mutex is not locked on every path through here?*" What does that mean?
656 requires ``c.mu`` to be locked, which cannot be declared directly because ``mu``
910 bool locked;
914 MutexLocker(Mutex *mu) ACQUIRE(mu) : mut(mu), locked(true) {
919 MutexLocker(Mutex *mu, adopt_lock_t) REQUIRES(mu) : mut(mu), locked(true) {}
922 MutexLocker(Mutex *mu, shared_lock_t) ACQUIRE_SHARED(mu) : mut(mu), locked(true) {
928 : mut(mu), locked(true) {}
931 MutexLocker(Mutex *mu, defer_lock_t) EXCLUDES(mu) : mut(mu), locked(false) {}
936 if (locked)
943 locked = true;
948 return locked = mut->TryLock();
954 locked = true;
959 return locked = mut->ReaderTryLock();
965 locked = false;
971 locked = false;