This source file contains the implementation of _Futex_Wait() and _Futex_Wake().
More...
|
| RTEMS_STATIC_ASSERT (offsetof(Futex_Control, Queue)==offsetof(struct _Futex_Control, _Queue), FUTEX_CONTROL_QUEUE) |
|
| RTEMS_STATIC_ASSERT (sizeof(Futex_Control)==sizeof(struct _Futex_Control), FUTEX_CONTROL_SIZE) |
|
int | _Futex_Wait (struct _Futex_Control *_futex, int *uaddr, int val) |
| Performs the FUTEX_WAIT operation.
|
|
int | _Futex_Wake (struct _Futex_Control *_futex, int count) |
| Performs the FUTEX_WAKE operation.
|
|
This source file contains the implementation of _Futex_Wait() and _Futex_Wake().
◆ _Futex_Wait()
int _Futex_Wait |
( |
struct _Futex_Control * |
_futex, |
|
|
int * |
uaddr, |
|
|
int |
val |
|
) |
| |
Performs the FUTEX_WAIT
operation.
- Parameters
-
[in,out] | _futex | is the futex object. |
[in] | uaddr | is the address to the futex state. |
| val | is the expected futex state value. |
- Return values
-
0 | Returns zero if the futex state is equal to the expected value. In this case the calling thread is enqueued on the thread queue of the futex object. |
EAGAIN | Returns EAGAIN if the futex state is not equal to the expected value. |
◆ _Futex_Wake()
int _Futex_Wake |
( |
struct _Futex_Control * |
_futex, |
|
|
int |
count |
|
) |
| |
Performs the FUTEX_WAKE
operation.
- Parameters
-
[in,out] | _futex | is the futex object. |
| count | is the maximum count of threads to wake up. |
- Returns
- Returns the count of woken up threads.