Atomic spinlock class. More...
#include <atomic.h>
Public Member Functions | |
| bool | acquire (void) |
| Acquire the lock. | |
| void | release (void) |
| Release an acquired spinlock. | |
| spinlock () | |
| Construct and initialize spinlock. | |
Atomic spinlock class.
Used as high-performance sync lock between threads.
Definition at line 80 of file atomic.h.
| bool ucc::atomic::spinlock::acquire | ( | void | ) |
Acquire the lock.
If the lock is not acquired, one "spins" by doing something else. One suggestion is using thread::yield.
1.6.3