Phoenix
Object-oriented orthogonally persistent operating system
|
Spin lock synchronization primitive. More...
#include <md_lock.h>
Public Member Functions | |
void | Lock () |
Acquire lock. | |
void | Unlock () |
Release lock. | |
int | TryLock () |
Try to acquire lock. | |
operator bool () |
Spin lock synchronization primitive.
This primitive just stops code execution in a small loop until a lock is released.
void SpinLock::Lock | ( | ) | [inline] |
Acquire lock.
SpinLock::operator bool | ( | ) | [inline] |
int SpinLock::TryLock | ( | ) | [inline] |
Try to acquire lock.
This method will not block if the lock can not be acquired.
void SpinLock::Unlock | ( | ) | [inline] |
Release lock.