roo_threads
API Documentation for roo_threads
Loading...
Searching...
No Matches
roo_threads::doc::mutex Class Reference

Mutual exclusion primitive. More...

#include <mutex_api.h>

Public Member Functions

 mutex () noexcept
 Constructs a mutex.
 
 mutex (const mutex &)=delete
 
mutexoperator= (const mutex &)=delete
 
void lock ()
 Blocks until the mutex is acquired.
 
bool try_lock ()
 Attempts to acquire the mutex without blocking.
 
void unlock ()
 Releases the mutex.
 

Detailed Description

Mutual exclusion primitive.

Definition at line 12 of file mutex_api.h.

Constructor & Destructor Documentation

◆ mutex() [1/2]

roo_threads::doc::mutex::mutex ( )
noexcept

Constructs a mutex.

◆ mutex() [2/2]

roo_threads::doc::mutex::mutex ( const mutex )
delete

Member Function Documentation

◆ lock()

void roo_threads::doc::mutex::lock ( )

Blocks until the mutex is acquired.

◆ operator=()

mutex & roo_threads::doc::mutex::operator= ( const mutex )
delete

◆ try_lock()

bool roo_threads::doc::mutex::try_lock ( )

Attempts to acquire the mutex without blocking.

Returns
true if lock acquisition succeeded.

◆ unlock()

void roo_threads::doc::mutex::unlock ( )

Releases the mutex.


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