KiCad PCB EDA Suite
|
A trivial spinlock implementation with no optimization. More...
#include <spinlock.h>
Public Member Functions | |
KISPINLOCK () | |
void | lock () |
bool | try_lock () |
void | unlock () |
bool | test () |
Private Attributes | |
std::atomic< bool > | m_lock |
A trivial spinlock implementation with no optimization.
Don't use if congestion is expected!
Definition at line 29 of file spinlock.h.
|
inline |
Definition at line 32 of file spinlock.h.
|
inline |
Definition at line 36 of file spinlock.h.
References m_lock.
|
inline |
Definition at line 51 of file spinlock.h.
References m_lock.
|
inline |
Definition at line 41 of file spinlock.h.
References m_lock.
|
inline |
Definition at line 46 of file spinlock.h.
References m_lock.
|
private |
Definition at line 57 of file spinlock.h.
Referenced by lock(), test(), try_lock(), and unlock().