GRATgen
|
Simple spinlock. More...
Public Member Functions | |
spinlock () | |
Constructor. | |
bool | acquire (size_t max_retries) |
Try to acquire the lock. More... | |
void | acquire () |
Acquire the lock. More... | |
void | release () |
Release the lock. More... | |
Simple spinlock.
|
inline |
Try to acquire the lock.
max_retries | Maximum number of retries if first acquisition fails |
|
inline |
Acquire the lock.
Busy-wait as long as the lock is acquired.
|
inline |
Release the lock.