|
RTI Connext TSS C++ API
Version 4.2.0
|
RAII guard for TSS_Mutex (POSIX pthread_mutex_t wrapper) More...
#include <TssMutexGuard.hpp>
Public Member Functions | |
| TssMutexGuard (TSS_Mutex *mutex, bool initialized) | |
| Attempt to acquire lock on construction. | |
| ~TssMutexGuard () | |
| Release lock on destruction (if acquired) | |
| bool | locked () const |
| Check whether lock was successfully acquired. | |
| void | unlock () |
| Manually release the lock before destruction. | |
| bool | relock () |
| Re-acquire the lock after a prior unlock(). | |
RAII guard for TSS_Mutex (POSIX pthread_mutex_t wrapper)
Acquires lock on construction, releases on destruction. Guards against use-after-lock and missing unlock via RAII discipline. Safe for exception-based unwinding in C++.
|
inline |
Attempt to acquire lock on construction.
| mutex | Pointer to TSS_Mutex (may be NULL) |
| initialized | Whether the mutex has been initialized |
|
inline |
Release lock on destruction (if acquired)
|
inline |
Check whether lock was successfully acquired.
|
inline |
Manually release the lock before destruction.
Safe to call multiple times; subsequent calls are no-ops.
|
inline |
Re-acquire the lock after a prior unlock().