A base class for a Lock.
More...
#include <xsens_mutex.h>
A base class for a Lock.
Definition at line 947 of file xsens_mutex.h.
◆ Lock() [1/5]
xsens::Lock::Lock |
( |
Lock const & |
| ) |
|
|
privatedelete |
◆ Lock() [2/5]
xsens::Lock::Lock |
( |
Lock && |
rhs | ) |
|
|
inlineprivate |
◆ Lock() [3/5]
xsens::Lock::Lock |
( |
Mutex * |
mutex | ) |
|
|
inline |
Constructs a lock a given mutex.
- Parameters
-
mutex | The pointer to a mutex to lock |
Definition at line 980 of file xsens_mutex.h.
◆ Lock() [4/5]
xsens::Lock::Lock |
( |
Mutex * |
mutex, |
|
|
bool |
lockit |
|
) |
| |
|
inline |
Constructs a lock a given mutex.
- Parameters
-
mutex | The pointer to a mutex to lock |
lockit | If set to true then it will lock a mutex |
Definition at line 990 of file xsens_mutex.h.
◆ Lock() [5/5]
Constructs a lock a given mutex.
- Parameters
-
mutex | The pointer to a mutex to lock |
lockit | If is not set to an unlocked state then it will lock it |
Definition at line 1003 of file xsens_mutex.h.
◆ ~Lock()
◆ CHECK_LOCK_DEFINE()
xsens::Lock::CHECK_LOCK_DEFINE |
( |
| ) |
|
|
private |
◆ isLocked()
bool xsens::Lock::isLocked |
( |
| ) |
const |
|
inline |
◆ lock() [1/2]
bool xsens::Lock::lock |
( |
| ) |
|
|
inline |
Locks the unlocked mutex.
- Returns
- True if the mutex is successfully locked
Definition at line 1019 of file xsens_mutex.h.
◆ lock() [2/2]
Locks the unlocked mutex.
- Parameters
-
ls | LockState, either LS_Unlocked to unlock or any other value to lock |
- Returns
- True if the mutex is successfully locked
Definition at line 1047 of file xsens_mutex.h.
◆ operator=() [1/2]
Lock& xsens::Lock::operator= |
( |
Lock && |
rhs | ) |
|
|
inlineprivate |
◆ operator=() [2/2]
Lock& xsens::Lock::operator= |
( |
Lock const & |
| ) |
|
|
privatedelete |
◆ tryLock() [1/2]
bool xsens::Lock::tryLock |
( |
| ) |
|
|
inline |
Tries to lock the unlocked mutex.
- Returns
- True if the mutex is successfully locked
Definition at line 1058 of file xsens_mutex.h.
◆ tryLock() [2/2]
Tries to lock the unlocked mutex.
- Parameters
-
ls | LockState, either LS_Unlocked to unlock or any other value to lock |
- Returns
- True if the mutex is successfully locked
Definition at line 1072 of file xsens_mutex.h.
◆ unlock()
bool xsens::Lock::unlock |
( |
| ) |
|
|
inlinenoexcept |
Unlocks the locked mutex.
- Returns
- True if the mutex is successfully unlocked
Definition at line 1032 of file xsens_mutex.h.
◆ m_locked
volatile std::atomic_bool xsens::Lock::m_locked |
|
private |
◆ m_mutex
Mutex* xsens::Lock::m_mutex |
|
private |
The documentation for this class was generated from the following file: