TDME2 1.9.121
|
Spin Lock implementation. More...
#include <tdme/os/threading/SpinLock.h>
Public Member Functions | |
SpinLock (const string &name) | |
Public constructor. More... | |
~SpinLock () | |
Destroys the spin lock. More... | |
bool | tryLock () |
Tries to locks the spin lock. More... | |
void | lock () |
Locks the spin lock, additionally spin lock locks will block until other locks have been unlocked. More... | |
void | unlock () |
Unlocks this spin lock. More... | |
Private Attributes | |
string | name |
atomic_flag | locked = ATOMIC_FLAG_INIT |
Spin Lock implementation.
Definition at line 16 of file SpinLock.h.
SpinLock | ( | const string & | name | ) |
~SpinLock | ( | ) |
Destroys the spin lock.
Definition at line 15 of file SpinLock.cpp.
|
inline |
Locks the spin lock, additionally spin lock locks will block until other locks have been unlocked.
Definition at line 40 of file SpinLock.h.
|
inline |
Tries to locks the spin lock.
Definition at line 32 of file SpinLock.h.
|
inline |
Unlocks this spin lock.
Definition at line 47 of file SpinLock.h.
|
private |
Definition at line 53 of file SpinLock.h.
|
private |
Definition at line 52 of file SpinLock.h.