WPILibC++  2019.3.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
wpi::recursive_spinlock1 Class Reference

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 ()
 

Detailed Description

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.


The documentation for this class was generated from the following file: