arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
SpinLock Class Reference

Busy-wait lock based on std::atomic - available on all platforms that support <atomic>. More...

#include <Mutex.h>

Inheritance diagram for SpinLock:
MutexBase

Public Member Functions

void lock () override
 
bool try_lock ()
 
void unlock () override
 

Protected Attributes

std::atomic< bool > lock_ = {false}
 

Detailed Description

Busy-wait lock based on std::atomic - available on all platforms that support <atomic>.

Author
Phil Schatzmann

Member Function Documentation

◆ lock()

void lock ( )
inlineoverridevirtual

Reimplemented from MutexBase.

◆ try_lock()

bool try_lock ( )
inline

◆ unlock()

void unlock ( )
inlineoverridevirtual

Reimplemented from MutexBase.

Member Data Documentation

◆ lock_

std::atomic<bool> lock_ = {false}
protected

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