class SpinLock
Defined at line 56 of file ../../third_party/abseil-cpp/absl/base/internal/spinlock.h
Public Methods
void SpinLock ()
Defined at line 58 of file ../../third_party/abseil-cpp/absl/base/internal/spinlock.h
void SpinLock (base_internal::SchedulingMode mode)
Constructors that allow non-cooperative spinlocks to be created for use
inside thread schedulers. Normal clients should not use these.
void SpinLock (absl::ConstInitType , base_internal::SchedulingMode mode)
Constructor for global SpinLock instances. See absl/base/const_init.h.
Defined at line 67 of file ../../third_party/abseil-cpp/absl/base/internal/spinlock.h
void ~SpinLock ()
Defined at line 76 of file ../../third_party/abseil-cpp/absl/base/internal/spinlock.h
void Lock ()
Acquire this SpinLock.
Defined at line 80 of file ../../third_party/abseil-cpp/absl/base/internal/spinlock.h
bool TryLock ()
Try to acquire this SpinLock without blocking and return true if the
acquisition was successful. If the lock was not acquired, false is
returned. If this SpinLock is free at the time of the call, TryLock
will return true with high probability.
Defined at line 92 of file ../../third_party/abseil-cpp/absl/base/internal/spinlock.h
void Unlock ()
Release this SpinLock, which must be held by the calling thread.
Defined at line 102 of file ../../third_party/abseil-cpp/absl/base/internal/spinlock.h
bool IsHeld ()
Determine if the lock is held. When the lock is held by the invoking
thread, true will always be returned. Intended to be used as
CHECK(lock.IsHeld()).
Defined at line 123 of file ../../third_party/abseil-cpp/absl/base/internal/spinlock.h
void AssertHeld ()
Return immediately if this thread holds the SpinLock exclusively.
Otherwise, report an error by crashing with a diagnostic.
Defined at line 129 of file ../../third_party/abseil-cpp/absl/base/internal/spinlock.h
Protected Methods
uint32_t EncodeWaitCycles (int64_t wait_start_time, int64_t wait_end_time)
Store number of cycles between wait_start_time and wait_end_time in a
lock value.
int64_t DecodeWaitCycles (uint32_t lock_value)
Extract number of wait cycles in a lock value.
Friends
class AllocationGuardSpinLockHolder
class SpinLockTest