Argon RTOS
1.3.0
Tiny embedded real-time kernel
|
#include <ar_classes.h>
Utility class to automatically get and put a mutex.
This class is intended to be stack allocated. It gets and holds a mutex for the duration of the scope in which it is declared. Once it goes out of scope, the destructor automatically puts the lock.
Public Member Functions | |
Guard (Mutex &mutex) | |
Constructor which gets the mutex. | |
~Guard () | |
Destructor that puts the mutex. | |
Protected Attributes | |
Mutex & | m_mutex |
The mutex to hold. | |