|
RTOS Wrapper
API reference
|
Named-mutex wrapper used by BaseThread infrastructure.
More...
Go to the source code of this file.
Classes | |
| class | Mutex |
Named-mutex wrapper used by BaseThread infrastructure.
Mutex class definition.
The Mutex class wraps a dynamically created RTOS mutex with a name for debugging. The handle is created in the constructor and destroyed when the Mutex object goes out of scope.
Thread-safety: lock / unlock are safe from any task context (FreeRTOS mutex). Not ISR-safe — use RtosMutex or a critical section for ISRs.
Allocation: one RTOS mutex handle is allocated on construction; no allocation in Lock / Unlock.
For std::lock_guard compatibility use RtosMutex (see RtosMutex.h); this class is the named-handle variant intended for BaseThread infrastructure that exposes the handle by name.
The Mutex class provides wrapper for a "named" mutex that is created dynamically created. When the Mutex object goes out of scope, the threadX mustex is deleted.