WPILibC++ 2023.4.3
wpi::recursive_spinlock2 Class Reference

A recursive spinlock mutex. More...

#include <wpi/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 spins directly on the std::atomic of the thread id. It is generally faster on embedded ARM platforms such as the RoboRIO and Raspberry Pi, compared to recursive_spinlock1.

Member Function Documentation

◆ lock()

LLVM_ATTRIBUTE_ALWAYS_INLINE void wpi::recursive_spinlock2::lock ( )
inline

◆ try_lock()

LLVM_ATTRIBUTE_ALWAYS_INLINE bool wpi::recursive_spinlock2::try_lock ( )
inline

◆ unlock()

LLVM_ATTRIBUTE_ALWAYS_INLINE void wpi::recursive_spinlock2::unlock ( )
inline

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