A guarded lock class.
More...
#include <xsens_mutex.h>
A guarded lock class.
Definition at line 1569 of file xsens_mutex.h.
◆ LockGuarded() [1/4]
xsens::LockGuarded::LockGuarded |
( |
LockGuarded const & |
| ) |
|
|
privatedelete |
◆ LockGuarded() [2/4]
◆ LockGuarded() [3/4]
xsens::LockGuarded::LockGuarded |
( |
GuardedMutex * |
mutex, |
|
|
bool |
lockit = true |
|
) |
| |
|
inline |
Constructs a guarded lock using a guarded mutex.
Definition at line 1584 of file xsens_mutex.h.
◆ LockGuarded() [4/4]
Constructs a guarded lock using a guarded mutex and a lock state.
Definition at line 1592 of file xsens_mutex.h.
◆ ~LockGuarded()
xsens::LockGuarded::~LockGuarded |
( |
| ) |
|
|
inline |
◆ isLocked()
bool xsens::LockGuarded::isLocked |
( |
| ) |
const |
|
inline |
- Returns
- True if the mutex is locked by this lock
Definition at line 1630 of file xsens_mutex.h.
◆ isUsing() [1/3]
bool xsens::LockGuarded::isUsing |
( |
GuardedMutex const * |
mutex | ) |
const |
|
inline |
Check if the lock is using the supplied mutex.
- Parameters
-
mutex | The supplied guarded mutex |
- Returns
- True if it is equal
Definition at line 1639 of file xsens_mutex.h.
◆ isUsing() [2/3]
bool xsens::LockGuarded::isUsing |
( |
Mutex const * |
mutex | ) |
const |
|
inline |
Check if the lock is using the supplied mutex.
- Parameters
-
mutex | The supplied generic mutex |
- Returns
- True if it is equal
Definition at line 1657 of file xsens_mutex.h.
◆ isUsing() [3/3]
Check if the lock is using the supplied mutex.
- Parameters
-
mutex | The supplied suspendable readers-writer mutex |
- Returns
- True if it is equal
Definition at line 1648 of file xsens_mutex.h.
◆ lock()
bool xsens::LockGuarded::lock |
( |
| ) |
|
|
inline |
Locks the unlocked mutex.
- Returns
- True if the mutex is successfully locked
Definition at line 1608 of file xsens_mutex.h.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ unlock()
bool xsens::LockGuarded::unlock |
( |
| ) |
|
|
inlinenoexcept |
Unlocks the locked mutex.
- Returns
- True if the mutex is successfully unlocked
Definition at line 1618 of file xsens_mutex.h.
◆ m_locked
volatile std::atomic_bool xsens::LockGuarded::m_locked |
|
private |
◆ m_mutex
The documentation for this class was generated from the following file: