Embedded Multicore Building Blocks V1.0.0
|
Scoped lock (according to the RAII principle) using a mutex. More...
#include <mutex.h>
Public Member Functions | |
LockGuard (Mutex &mutex) | |
Creates the lock and locks the mutex. More... | |
~LockGuard () | |
Unlocks the mutex. More... | |
Scoped lock (according to the RAII principle) using a mutex.
The mutex is locked on construction and unlocked on leaving the scope of the lock.
Mutex | Used mutex type. Has to fulfil the Mutex Concept. |
|
explicit |
Creates the lock and locks the mutex.
[in] | mutex | Mutex to be guarded |
embb::base::LockGuard< Mutex >::~LockGuard | ( | ) |
Unlocks the mutex.