EtcPal  0.4.1
ETC Platform Abstraction Layer (EtcPal)
View other versions:
RecursiveMutexGuard Class Reference

Overview

Lock guard around a recursive mutex.

Lock is taken when this class is instantiated, and released when it goes out of scope. Example usage:

void Class::CriticalFunction()
{
// Do critical section operations here
// Lock is released when it goes out of scope
}
Lock guard around a recursive mutex.
Definition: recursive_mutex.h:149

Public Member Functions

 RecursiveMutexGuard (RecursiveMutex &mutex)
 Lock an etcpal::RecursiveMutex. More...
 
 RecursiveMutexGuard (etcpal_recursive_mutex_t &mutex)
 Lock an etcpal_recursive_mutex_t. More...
 
 ~RecursiveMutexGuard ()
 Release the lock upon going out-of-scope.
 
 RecursiveMutexGuard (const RecursiveMutexGuard &other)=delete
 
RecursiveMutexGuardoperator= (const RecursiveMutexGuard &other)=delete
 
 RecursiveMutexGuard (RecursiveMutexGuard &&other)=delete
 
RecursiveMutexGuardoperator= (RecursiveMutexGuard &&other)=delete
 

Constructor & Destructor Documentation

◆ RecursiveMutexGuard() [1/2]

RecursiveMutexGuard ( RecursiveMutex mutex)
inlineexplicit

Lock an etcpal::RecursiveMutex.

Exceptions
std::runtime_errorif locking the mutex failed.

◆ RecursiveMutexGuard() [2/2]

RecursiveMutexGuard ( etcpal_recursive_mutex_t mutex)
inlineexplicit

Lock an etcpal_recursive_mutex_t.

Exceptions
std::runtime_errorif locking the mutex failed.

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