|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
Busy-waiting lock on an atomic flag; satisfies the lock() and unlock() interface of std::lock_guard. More...
#include <SpinLock.hh>
Public Member Functions | |
| SpinLock () | |
| Construct unlocked. | |
| ~SpinLock ()=default | |
| Defaulted destructor. | |
| SpinLock (const SpinLock &)=delete | |
| Deleted: a lock cannot be copied. | |
| SpinLock & | operator= (const SpinLock &)=delete |
| Deleted: a lock cannot be copy-assigned. | |
| void | lock () |
| Spin until the flag is acquired, executing a pause instruction and yielding the thread between attempts. | |
| void | unlock () |
| Clear the flag. | |
Busy-waiting lock on an atomic flag; satisfies the lock() and unlock() interface of std::lock_guard.
Not copyable.
|
inline |
Construct unlocked.
|
default |
Defaulted destructor.
|
delete |
Deleted: a lock cannot be copied.
|
inline |
Spin until the flag is acquired, executing a pause instruction and yielding the thread between attempts.
Deleted: a lock cannot be copy-assigned.
|
inline |
Clear the flag.