Lines Matching refs:lock
17 BasicLockTestThread(Lock* lock) : lock_(lock), acquired_(0) {} in BasicLockTestThread() argument
50 Lock lock; in TEST() local
51 BasicLockTestThread thread(&lock); in TEST()
58 lock.Acquire(); in TEST()
60 lock.Release(); in TEST()
63 lock.Acquire(); in TEST()
66 lock.Release(); in TEST()
69 if (lock.Try()) { in TEST()
72 lock.Release(); in TEST()
76 lock.Acquire(); in TEST()
79 lock.Release(); in TEST()
92 TryLockTestThread(Lock* lock) : lock_(lock), got_lock_(false) {} in TryLockTestThread() argument
110 Lock lock; in TEST() local
112 ASSERT_TRUE(lock.Try()); in TEST()
117 TryLockTestThread thread(&lock); in TEST()
127 lock.Release(); in TEST()
131 TryLockTestThread thread(&lock); in TEST()
140 ASSERT_TRUE(lock.Try()); in TEST()
143 lock.Release(); in TEST()
150 MutexLockTestThread(Lock* lock, int* value) : lock_(lock), value_(value) {} in MutexLockTestThread() argument
153 static void DoStuff(Lock* lock, int* value) { in DoStuff() argument
155 lock->Acquire(); in DoStuff()
159 lock->Release(); in DoStuff()
175 Lock lock; in TEST() local
178 MutexLockTestThread thread(&lock, &value); in TEST()
183 MutexLockTestThread::DoStuff(&lock, &value); in TEST()
191 Lock lock; in TEST() local
194 MutexLockTestThread thread1(&lock, &value); in TEST()
195 MutexLockTestThread thread2(&lock, &value); in TEST()
196 MutexLockTestThread thread3(&lock, &value); in TEST()
205 MutexLockTestThread::DoStuff(&lock, &value); in TEST()