|
IntrOS
|
create and initialize a unique lock object More...
#include <osmutex.h>
Public Member Functions | |
| UniqueLock (Mutex &_mtx) | |
| constructor, see the constructor parameters of the class | |
| template<typename T> | |
| UniqueLock (Mutex &_mtx, const T &_delay) | |
| constructor, see the constructor parameters of the class | |
| UniqueLock (UniqueLock &&_src) | |
| move constructor | |
| UniqueLock ()=default | |
| default constructor | |
| UniqueLock (const UniqueLock &)=delete | |
| UniqueLock & | operator= (const UniqueLock &)=delete |
| UniqueLock & | operator= (UniqueLock &&_src) |
| unlock the held mutex and take over the mutex of _src | |
| bool | tryLock () |
| try to lock the mutex, don't wait; true: the mutex is locked | |
| template<typename T> | |
| bool | waitFor (const T &_delay) |
| try to lock the mutex, wait for given duration of time; true: the mutex is locked | |
| template<typename T> | |
| bool | waitUntil (const T &_time) |
| try to lock the mutex, wait until given timepoint; true: the mutex is locked | |
| bool | lock () |
| lock the mutex, wait indefinitely; true: the mutex is locked | |
| bool | unlock () |
| unlock the mutex; true: the mutex was unlocked | |
| bool | ownsLock () const |
| true: the mutex is locked by the object | |
| operator bool () const | |
| ownsLock() | |
| Mutex * | release () |
| release the mutex without unlocking it, return the mutex | |
| Mutex * | mutex () const |
| associated mutex | |
create and initialize a unique lock object