#include <Mutex.hpp>
Definition at line 16 of file Mutex.hpp.
◆ Mutex()
Mutex::Mutex |
( |
const char * |
name = nullptr | ) |
|
Construct a new Mutex object.
- Parameters
-
name | Mutex name (for debugging / printing) |
Definition at line 13 of file Mutex.cpp.
◆ lock()
Aquire the mutex.
- Returns
- int Returns true on success.
Definition at line 20 of file Mutex.cpp.
22 while (__atomic_test_and_set(&
m_isLocked, __ATOMIC_RELEASE)) {
◆ tryLock()
Try to aquire the mutex and return immediately if already locked.
- Returns
- int Returns true on success.
Definition at line 29 of file Mutex.cpp.
31 if (__atomic_test_and_set(&
m_isLocked, __ATOMIC_RELEASE)) {
◆ unlock()
Release the mutex.
- Returns
- int Returns true on success.
Definition at line 38 of file Mutex.cpp.
◆ m_isLocked
◆ m_taskSync
The documentation for this class was generated from the following files: