WPILibC++ 2023.4.3
wpi::spinlock Class Reference

A spinlock mutex. More...

#include <wpi/spinlock.h>

Public Member Functions

 spinlock () noexcept
 
LLVM_ATTRIBUTE_ALWAYS_INLINE bool try_lock ()
 
LLVM_ATTRIBUTE_ALWAYS_INLINE void lock ()
 
LLVM_ATTRIBUTE_ALWAYS_INLINE void unlock ()
 

Detailed Description

A spinlock mutex.

Wraps std::atomic_flag in a std::mutex compatible way.

Constructor & Destructor Documentation

◆ spinlock()

wpi::spinlock::spinlock ( )
inlinenoexcept

Member Function Documentation

◆ lock()

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

◆ try_lock()

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

◆ unlock()

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

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