FreeRTOS Addons
|
#include <mutex.hpp>
Public Member Functions | |
MutexRecursive () | |
virtual bool | Lock (TickType_t Timeout=portMAX_DELAY) |
virtual bool | Unlock () |
Public Member Functions inherited from cpp_freertos::Mutex | |
virtual | ~Mutex () |
virtual bool | Lock (TickType_t Timeout=portMAX_DELAY)=0 |
virtual bool | Unlock ()=0 |
Additional Inherited Members | |
Protected Member Functions inherited from cpp_freertos::Mutex | |
Mutex () | |
Protected Attributes inherited from cpp_freertos::Mutex | |
SemaphoreHandle_t | handle |
Recursive usage Mutex.
By default calls to Lock these objects block forever, but this can be changed by simply passing in a argument to the Lock() method. These objects are recursively acquirable. Calling Lock() twice from the same Thread (i.e. task) works fine. The caller just needs to be sure to call Unlock() as many times as Lock().
MutexRecursive::MutexRecursive | ( | ) |
Create a recursize Mutex.
ThreadMutexException | on failure. |
|
virtual |
Lock the Mutex.
Timeout | How long to wait to get the Lock until giving up. |
Implements cpp_freertos::Mutex.
|
virtual |
Unlock the Mutex.
Implements cpp_freertos::Mutex.