Futex-based mutex for intra-process locking.
More...
#include <futex.hpp>
|
| | Futex () noexcept |
| | default constructor.
|
| |
| | Futex (const Futex &other)=delete |
| | copy constructor.
|
| |
| Futex & | operator= (const Futex &other)=delete |
| | copy assignment.
|
| |
| | Futex (Futex &&other)=delete |
| | move constructor.
|
| |
| Futex & | operator= (Futex &&other)=delete |
| | move assignment.
|
| |
| | ~Futex ()=default |
| | destructor.
|
| |
| void | lock () noexcept |
| | lock the futex, blocking until it becomes available.
|
| |
| bool | tryLock () noexcept |
| | try to lock the futex without blocking.
|
| |
| void | unlock () noexcept |
| | unlock the futex, waking one waiter if any.
|
| |
| std::atomic_uint32_t * | handle () noexcept |
| | get a pointer to the underlying futex word.
|
| |
Futex-based mutex for intra-process locking.
◆ Futex() [1/3]
◆ Futex() [2/3]
| join::Futex::Futex |
( |
const Futex & | other | ) |
|
|
delete |
copy constructor.
- Parameters
-
| other | other object to copy. |
◆ Futex() [3/3]
| join::Futex::Futex |
( |
Futex && | other | ) |
|
|
delete |
move constructor.
- Parameters
-
| other | other object to move. |
◆ ~Futex()
◆ handle()
| std::atomic_uint32_t * join::Futex::handle |
( |
| ) |
|
|
inlinenoexcept |
get a pointer to the underlying futex word.
- Returns
- pointer to the atomic futex word.
◆ lock()
| void join::Futex::lock |
( |
| ) |
|
|
inlinenoexcept |
lock the futex, blocking until it becomes available.
◆ operator=() [1/2]
| Futex & join::Futex::operator= |
( |
const Futex & | other | ) |
|
|
delete |
copy assignment.
- Parameters
-
| other | other object to copy. |
- Returns
- a reference to the current object.
◆ operator=() [2/2]
move assignment.
- Parameters
-
| other | other object to move. |
- Returns
- a reference to the current object.
◆ tryLock()
| bool join::Futex::tryLock |
( |
| ) |
|
|
inlinenoexcept |
try to lock the futex without blocking.
- Returns
- true if the lock was acquired, false if it was already locked.
◆ unlock()
| void join::Futex::unlock |
( |
| ) |
|
|
inlinenoexcept |
unlock the futex, waking one waiter if any.
The documentation for this class was generated from the following file: