#include <Futex.H>
Class to implement Futex signalling.
Definition at line 29 of file Futex.H.
◆ Futex()
◆ wait()
Wait on the wake signal (using the DEFAULT_START_VAL)
- Returns
- 0 on success, or <0 on failure
Definition at line 40 of file Futex.H.
◆ waitVal()
int Futex::waitVal |
( |
int |
val | ) |
|
|
inline |
Wait on the wake signal or if val hasn't changed.
- Parameters
-
val | The waiting value for f : if still this value, then wait |
- Returns
- 0 on success, or <0 on failure
Definition at line 48 of file Futex.H.
◆ wake()
int Futex::wake |
( |
int |
howMany | ) |
|
|
inline |
Wakes up threads in the wait method.
- Parameters
-
howMany | INT_MAX for all, otherwise <INT_MAX for that many. |
- Returns
- the number of waiters woken up or <0 on error
Definition at line 61 of file Futex.H.
◆ wakeAll()
Wake all waiting threads.
- Returns
- the number of waiters woken up or <0 on error
Definition at line 72 of file Futex.H.
The futex variable.
Definition at line 31 of file Futex.H.
The documentation for this class was generated from the following file: