Lines Matching refs:SpinLock
49 return SpinLock::EncodeWaitCycles(wait_start_time, wait_end_time); in EncodeWaitCycles()
52 return SpinLock::DecodeWaitCycles(lock_value); in DecodeWaitCycles()
61 ABSL_CONST_INIT static SpinLock static_cooperative_spinlock(
63 ABSL_CONST_INIT static SpinLock static_noncooperative_spinlock(
82 static void TestFunction(int thread_salt, SpinLock* spinlock) { in TestFunction()
93 static void ThreadedTest(SpinLock* spinlock) { in ThreadedTest()
109 static_assert(std::is_trivially_destructible<SpinLock>(), "");
112 TEST(SpinLock, StackNonCooperativeDisablesScheduling) { in TEST() argument
113 SpinLock spinlock(base_internal::SCHEDULE_KERNEL_ONLY); in TEST()
119 TEST(SpinLock, StaticNonCooperativeDisablesScheduling) { in TEST() argument
125 TEST(SpinLock, WaitCyclesEncoding) { in TEST() argument
199 SpinLock spinlock; in TEST()
204 SpinLock spinlock(base_internal::SCHEDULE_COOPERATIVE_AND_KERNEL); in TEST()
209 SpinLock spinlock(base_internal::SCHEDULE_KERNEL_ONLY); in TEST()
223 static void NotifyThenLock(Notification* locked, SpinLock* spinlock, in TEST()
230 static void LockThenWait(Notification* locked, SpinLock* spinlock, in TEST()
237 static void DeadlockTest(SpinLock* spinlock, int num_spinners) { in TEST()
255 SpinLock stack_cooperative_spinlock( in TEST()
257 SpinLock stack_noncooperative_spinlock(base_internal::SCHEDULE_KERNEL_ONLY); in TEST()