Zephyr C++ Toolkit
|
#include <Mutex.hpp>
Public Member Functions | |
~MutexLockGuard () | |
MutexLockGuard (const MutexLockGuard &)=delete | |
MutexLockGuard & | operator= (const MutexLockGuard &)=delete |
MutexLockGuard (MutexLockGuard &&) | |
MutexLockGuard & | operator= (MutexLockGuard &&)=delete |
bool | didGetLock () const |
Check if the mutex was successfully locked with this lock guard. | |
Protected Member Functions | |
MutexLockGuard (Mutex &mutex, k_timeout_t timeout, int &mutexRc) | |
Constructor is hidden since we only want to allow the Mutex class to construct MutexLockGuard objects. | |
Protected Attributes | |
Mutex & | m_mutex |
bool | m_didGetLock = false |
Friends | |
class | Mutex |
A RAII class that locks the mutex when constructed and unlocks it when destroyed.
zct::MutexLockGuard::~MutexLockGuard | ( | ) |
|
delete |
zct::MutexLockGuard::MutexLockGuard | ( | MutexLockGuard && | ) |
|
protected |
Constructor is hidden since we only want to allow the Mutex class to construct MutexLockGuard objects.
bool zct::MutexLockGuard::didGetLock | ( | ) | const |
Check if the mutex was successfully locked with this lock guard.
|
delete |
|
delete |
|
friend |
|
protected |
|
protected |
The mutex this guard is locking/unlocking.