16 #ifndef BLOOMBERG_QUANTUM_SPINLOCK_H 17 #define BLOOMBERG_QUANTUM_SPINLOCK_H 125 std::atomic_flag _flag;
130 #include <quantum/impl/quantum_spinlock_impl.h> 132 #endif //BLOOMBERG_QUANTUM_SPINLOCK_H Guard(SpinLock &lock)
Construct this object and lock the passed-in spinlock.
Definition: quantum_spinlock_impl.h:49
Definition: quantum_spinlock.h:71
void lock()
Locks this object.
Definition: quantum_buffer_impl.h:22
~Guard()
Destroy this object and unlock the underlying spinlock.
Definition: quantum_spinlock_impl.h:64
~ReverseGuard()
Acquire the underlying spinlock.
Definition: quantum_spinlock_impl.h:102
SpinLock()
Constructor. The object is in the unlocked state.
Definition: quantum_spinlock_impl.h:26
ReverseGuard(SpinLock &lock)
Release the passed-in spinlock.
Definition: quantum_spinlock_impl.h:95
bool tryLock()
Try to acquire the underlying spinlock.
Definition: quantum_spinlock_impl.h:72
Definition: quantum_spinlock.h:110
SpinLock & operator=(const SpinLock &)=delete
Copy assignment operator.
bool ownsLock() const
Indicates if this object owns the underlying spinlock.
Definition: quantum_spinlock_impl.h:90
std::try_to_lock_t TryToLock
Definition: quantum_spinlock.h:34
void lock()
Acquire the underlying spinlock.
Definition: quantum_spinlock_impl.h:81
void unlock()
Unlocks the current object.
Definition: quantum_spinlock_impl.h:43
bool tryLock()
Attempt to acquire the lock.
Definition: quantum_spinlock_impl.h:37