![]() |
SuperTinyKernel™ RTOS 1.05.3
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
RAII wrapper for attempting exclusive write access with a timeout. More...
#include <stk_sync_rwmutex.h>
Public Member Functions | |
| ScopedTimedLock (RWMutex &rw, Timeout timeout=WAIT_INFINITE) | |
| Constructs the guard and attempts to acquire the write lock. | |
| ~ScopedTimedLock () | |
| bool | IsLocked () const |
Private Member Functions | |
| STK_NONCOPYABLE_CLASS (ScopedTimedLock) | |
Private Attributes | |
| RWMutex & | m_rw |
| bool | m_locked |
RAII wrapper for attempting exclusive write access with a timeout.
Definition at line 87 of file stk_sync_rwmutex.h.
|
inlineexplicit |
Constructs the guard and attempts to acquire the write lock.
| [in] | rw | Reference to the RWMutex. |
| [in] | timeout | Maximum time to wait (ticks). Use NO_WAIT for non-blocking (TryLock). |
Definition at line 94 of file stk_sync_rwmutex.h.
References m_locked, m_rw, stk::sync::RWMutex::RWMutex(), stk::sync::RWMutex::TimedLock(), and stk::WAIT_INFINITE.
Referenced by STK_NONCOPYABLE_CLASS().
|
inline |
|
inline |
|
private |
|
private |
Definition at line 106 of file stk_sync_rwmutex.h.
Referenced by IsLocked(), ScopedTimedLock(), and ~ScopedTimedLock().
|
private |
Definition at line 105 of file stk_sync_rwmutex.h.
Referenced by ScopedTimedLock(), and ~ScopedTimedLock().