CUBRID Engine
latest
|
#include <spinlock-old.h>
Public Member Functions | |
SpinLockType (void) | |
~SpinLockType () | |
void | lock () |
void | unlock () |
Static Public Member Functions | |
static size_t | MyInterlockedExchange (size_t *, size_t) |
Private Types | |
enum | { UNLOCKED = 0, LOCKED = 1 } |
enum | { MAX_SPIN_LIMIT = 1024 } |
Private Member Functions | |
NO_INLINE void | contendedLock () |
bool | onMultiprocessor (void) |
void | yieldProcessor (void) |
Private Attributes | |
volatile size_t | mutex |
Definition at line 88 of file spinlock-old.h.
|
private |
Enumerator | |
---|---|
UNLOCKED | |
LOCKED |
Definition at line 91 of file spinlock-old.h.
|
private |
Enumerator | |
---|---|
MAX_SPIN_LIMIT |
Definition at line 177 of file spinlock-old.h.
|
inline |
Definition at line 95 of file spinlock-old.h.
|
inline |
Definition at line 103 of file spinlock-old.h.
|
inlineprivate |
Definition at line 143 of file spinlock-old.h.
References _MM_PAUSE, cubregex::count(), LOCKED, UNLOCKED, and yieldProcessor().
Referenced by lock().
|
inline |
Definition at line 106 of file spinlock-old.h.
References contendedLock(), LOCKED, mutex, MyInterlockedExchange(), and UNLOCKED.
|
inlinestatic |
Definition at line 193 of file spinlock-old.h.
Referenced by lock(), and unlock().
|
inlineprivate |
Definition at line 162 of file spinlock-old.h.
References HL::CPUInfo::getNumProcessors().
|
inline |
Definition at line 119 of file spinlock-old.h.
References mutex, MyInterlockedExchange(), NO_INLINE, and UNLOCKED.
|
inlineprivate |
Definition at line 167 of file spinlock-old.h.
Referenced by contendedLock().
|
private |
Definition at line 179 of file spinlock-old.h.