proxygen
|
#include <MicroSpinLock.h>
Public Types | |
enum | { FREE = 0, LOCKED = 1 } |
Public Member Functions | |
void | init () noexcept |
bool | try_lock () noexcept |
void | lock () noexcept |
void | unlock () noexcept |
Public Attributes | |
uint8_t | lock_ |
Private Member Functions | |
std::atomic< uint8_t > * | payload () noexcept |
bool | cas (uint8_t compare, uint8_t newVal) noexcept |
Definition at line 65 of file MicroSpinLock.h.
anonymous enum |
Enumerator | |
---|---|
FREE | |
LOCKED |
Definition at line 66 of file MicroSpinLock.h.
Definition at line 100 of file MicroSpinLock.h.
References payload(), and value.
Referenced by try_lock().
|
inlinenoexcept |
Definition at line 72 of file MicroSpinLock.h.
References FREE, and payload().
Referenced by folly::detail::SkipListNode< T >::SkipListNode(), and folly::SpinLock::SpinLock().
|
inlinenoexcept |
Definition at line 80 of file MicroSpinLock.h.
References deadlock::load(), LOCKED, payload(), try_lock(), and folly::detail::Sleeper::wait().
Referenced by folly::SpinLock::lock(), folly::futures::detail::SpinLock::SpinLock(), and folly::SpinLockGuardImpl< LOCK >::SpinLockGuardImpl().
|
inlineprivatenoexcept |
|
inlinenoexcept |
Definition at line 76 of file MicroSpinLock.h.
References cas(), FREE, and LOCKED.
Referenced by lock(), and folly::SpinLock::try_lock().
|
inlinenoexcept |
Definition at line 90 of file MicroSpinLock.h.
References FREE, deadlock::load(), LOCKED, and payload().
Referenced by folly::futures::detail::SpinLock::SpinLock(), folly::SpinLock::unlock(), and folly::SpinLockGuardImpl< LOCK >::~SpinLockGuardImpl().
uint8_t folly::MicroSpinLock::lock_ |
Definition at line 68 of file MicroSpinLock.h.
Referenced by payload().