Pothos
0.2.1-g9f04573d
The Pothos dataflow programming software suite
|
#include <SpinLock.hpp>
Public Member Functions | |
SpinLock (void) | |
Create a new unlocked spin lock. More... | |
void | lock (void) |
Lock the spin lock, block if already locked. More... | |
void | unlock (void) |
Unlock the spin lock (should be already locked) More... | |
A generic spin lock implementation using std::atomic.
There are no embedded back-off or sleep conditions in this lock, therefore only use this lock to protect very brief code sections.
This lock can be used with std::lock_guard<Pothos::Util::SpinLock>
|
inline |
Create a new unlocked spin lock.
|
inline |
Lock the spin lock, block if already locked.
|
inline |
Unlock the spin lock (should be already locked)