EtcPal
0.4.1
ETC Platform Abstraction Layer (EtcPal)
|
View other versions:
|
Lock guard around a mutex.
Lock is taken when this class is instantiated, and released when it goes out of scope. Example usage:
Public Member Functions | |
MutexGuard (Mutex &mutex) | |
Lock an etcpal::Mutex. More... | |
MutexGuard (etcpal_mutex_t &mutex) | |
Lock an etcpal_mutex_t. More... | |
~MutexGuard () | |
Release the lock upon going out-of-scope. | |
MutexGuard (const MutexGuard &other)=delete | |
MutexGuard & | operator= (const MutexGuard &other)=delete |
MutexGuard (MutexGuard &&other)=delete | |
MutexGuard & | operator= (MutexGuard &&other)=delete |
|
inlineexplicit |
Lock an etcpal::Mutex.
std::runtime_error | if locking the mutex failed. |
|
inlineexplicit |
Lock an etcpal_mutex_t.
std::runtime_error | if locking the mutex failed. |