![]() |
SuperTinyKernel™ RTOS 1.06.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
RAII wrapper for attempting shared read access with a timeout. More...
#include <stk_sync_rwmutex.h>
Public Member Functions | |
| ScopedTimedReadMutex (RWMutex &rw, Timeout timeout_ticks=WAIT_INFINITE) | |
| Constructs the guard and attempts to acquire the read lock. | |
| ~ScopedTimedReadMutex () | |
| bool | IsLocked () const |
Private Member Functions | |
| ScopedTimedReadMutex (const ScopedTimedReadMutex &)=delete | |
| ScopedTimedReadMutex & | operator= (const ScopedTimedReadMutex &)=delete |
Private Attributes | |
| RWMutex & | m_rw |
| bool | m_locked |
RAII wrapper for attempting shared read access with a timeout.
Definition at line 110 of file stk_sync_rwmutex.h.
|
inlineexplicit |
Constructs the guard and attempts to acquire the read lock.
| [in] | rw | Reference to the RWMutex. |
| [in] | timeout_ticks | Maximum time to wait (ticks). Use NO_WAIT for non-blocking (TryReadLock). |
Definition at line 117 of file stk_sync_rwmutex.h.
References m_locked, m_rw, stk::sync::RWMutex::RWMutex(), stk::sync::RWMutex::TimedReadLock(), and stk::WAIT_INFINITE.
Referenced by operator=().
|
inline |
|
privatedelete |
|
inline |
|
privatedelete |
|
private |
Definition at line 129 of file stk_sync_rwmutex.h.
Referenced by IsLocked(), ScopedTimedReadMutex(), and ~ScopedTimedReadMutex().
|
private |
Definition at line 128 of file stk_sync_rwmutex.h.
Referenced by ScopedTimedReadMutex(), and ~ScopedTimedReadMutex().