Lines Matching full:lock
18 class BASE_API Lock {
21 Lock() : lock_() {}
22 ~Lock() {}
23 void Acquire() { lock_.Lock(); }
26 // If the lock is not held, take it and return true. If the lock is already
28 // by a thread already holding the lock (what happens is undefined and an
35 Lock();
36 ~Lock() {}
40 // acquire the lock a second time (while already holding it).
42 lock_.Lock();
63 // to see our lock and tweak our debugging counters, as it releases
65 // Windows doesn't need to do this as it calls the Lock::* methods.
80 // Be VERY careful to only access members under that lock.
88 // Platform specific underlying lock implementation.
91 DISALLOW_COPY_AND_ASSIGN(Lock);
94 // A helper class that acquires the given Lock while the AutoLock is in scope.
97 explicit AutoLock(Lock& lock) : lock_(lock) {
107 Lock& lock_;
111 // AutoUnlock is a helper that will Release() the |lock| argument in the
115 explicit AutoUnlock(Lock& lock) : lock_(lock) {
116 // We require our caller to have the lock.
126 Lock& lock_;