|
ELEC-C7222
Libraries for ELEC C7222 Course Work
|
Ownership-based wrapper for a recursive mutex with destructor cleanup. More...
#include <freertos_mutex.hpp>


Public Member Functions | |
| FreeRtosRecursiveMutex () | |
| Construct and initialize a recursive mutex. | |
| bool | Initialize () |
| Initialize (or re-initialize) the recursive mutex. | |
| ~FreeRtosRecursiveMutex () | |
| Destroy recursive mutex resources if initialized. | |
| bool | Lock (std::uint32_t ticks_to_wait=0) |
| Acquire the recursive mutex. | |
| bool | TryLock () |
| Non-blocking lock attempt. | |
| bool | Unlock () |
| Release one recursion level. | |
| bool | IsValid () const |
Public Member Functions inherited from c7222::NonCopyable | |
| NonCopyable (const NonCopyable &)=delete | |
| NonCopyable & | operator= (const NonCopyable &)=delete |
| NonCopyable (NonCopyable &&)=default | |
| NonCopyable & | operator= (NonCopyable &&)=default |
Public Member Functions inherited from c7222::NonMovable | |
| NonMovable (const NonMovable &)=default | |
| NonMovable & | operator= (const NonMovable &)=default |
| NonMovable (NonMovable &&)=delete | |
| NonMovable & | operator= (NonMovable &&)=delete |
Additional Inherited Members | |
Protected Member Functions inherited from c7222::NonCopyableNonMovable | |
| NonCopyableNonMovable ()=default | |
| ~NonCopyableNonMovable ()=default | |
Protected Member Functions inherited from c7222::NonCopyable | |
| NonCopyable ()=default | |
| ~NonCopyable ()=default | |
Protected Member Functions inherited from c7222::NonMovable | |
| NonMovable ()=default | |
| ~NonMovable ()=default | |
Ownership-based wrapper for a recursive mutex with destructor cleanup.
A recursive mutex may be locked multiple times by the same owner and must be unlocked the same number of times.
Typical usage:
| c7222::FreeRtosRecursiveMutex::FreeRtosRecursiveMutex | ( | ) |
Construct and initialize a recursive mutex.
| c7222::FreeRtosRecursiveMutex::~FreeRtosRecursiveMutex | ( | ) |
Destroy recursive mutex resources if initialized.
| bool c7222::FreeRtosRecursiveMutex::Initialize | ( | ) |
Initialize (or re-initialize) the recursive mutex.
| bool c7222::FreeRtosRecursiveMutex::IsValid | ( | ) | const |
| bool c7222::FreeRtosRecursiveMutex::Lock | ( | std::uint32_t | ticks_to_wait = 0 | ) |
Acquire the recursive mutex.
| ticks_to_wait | Max ticks to wait (0 = non-blocking). |
| bool c7222::FreeRtosRecursiveMutex::TryLock | ( | ) |
Non-blocking lock attempt.
| bool c7222::FreeRtosRecursiveMutex::Unlock | ( | ) |
Release one recursion level.