Simple spinlock.
More...
◆ acquire() [1/2]
bool spinlock::acquire |
( |
size_t |
max_retries | ) |
|
|
inline |
Try to acquire the lock.
- Parameters
-
max_retries | Maximum number of retries if first acquisition fails |
- Returns
- True if acquisition successful.
◆ acquire() [2/2]
void spinlock::acquire |
( |
| ) |
|
|
inline |
Acquire the lock.
Busy-wait as long as the lock is acquired.
◆ release()
void spinlock::release |
( |
| ) |
|
|
inline |
Release the lock.
- Precondition
- Lock must be acquired by the calling thread.
The documentation for this class was generated from the following file: