Lines Matching refs:lock
20 explicit BasicLockTestThread(Lock* lock) : lock_(lock), acquired_(0) {} in BasicLockTestThread() argument
53 Lock lock; in TEST() local
54 BasicLockTestThread thread(&lock); in TEST()
61 lock.Acquire(); in TEST()
63 lock.Release(); in TEST()
66 lock.Acquire(); in TEST()
69 lock.Release(); in TEST()
72 if (lock.Try()) { in TEST()
75 lock.Release(); in TEST()
79 lock.Acquire(); in TEST()
82 lock.Release(); in TEST()
95 explicit TryLockTestThread(Lock* lock) : lock_(lock), got_lock_(false) {} in TryLockTestThread() argument
113 Lock lock; in TEST() local
115 ASSERT_TRUE(lock.Try()); in TEST()
120 TryLockTestThread thread(&lock); in TEST()
130 lock.Release(); in TEST()
134 TryLockTestThread thread(&lock); in TEST()
143 ASSERT_TRUE(lock.Try()); in TEST()
146 lock.Release(); in TEST()
153 MutexLockTestThread(Lock* lock, int* value) : lock_(lock), value_(value) {} in MutexLockTestThread() argument
156 static void DoStuff(Lock* lock, int* value) { in DoStuff() argument
158 lock->Acquire(); in DoStuff()
162 lock->Release(); in DoStuff()
176 Lock lock; in TEST() local
179 MutexLockTestThread thread(&lock, &value); in TEST()
184 MutexLockTestThread::DoStuff(&lock, &value); in TEST()
192 Lock lock; in TEST() local
195 MutexLockTestThread thread1(&lock, &value); in TEST()
196 MutexLockTestThread thread2(&lock, &value); in TEST()
197 MutexLockTestThread thread3(&lock, &value); in TEST()
206 MutexLockTestThread::DoStuff(&lock, &value); in TEST()