WPILibC++
2018.4.1-20180819050225-1157-gb44f27d
|
A recursive spinlock mutex. More...
#include <spinlock.h>
Public Member Functions | |
LLVM_ATTRIBUTE_ALWAYS_INLINE bool | try_lock () |
LLVM_ATTRIBUTE_ALWAYS_INLINE void | lock () |
LLVM_ATTRIBUTE_ALWAYS_INLINE void | unlock () |
A recursive spinlock mutex.
This version uses std::atomic_flag for spin, then checks the thread id for recursion. It is generally faster on desktop platforms compared to recursive_spinlock2.