![]() |
RTEMS 6.3
|
This source file contains the implementation of _Futex_Wait() and _Futex_Wake(). More...
#include <sys/lock.h>#include <errno.h>#include <rtems/score/atomic.h>#include <rtems/score/chainimpl.h>#include <rtems/score/threadimpl.h>#include <rtems/score/threadqimpl.h>Data Structures | |
| struct | Futex_Control |
| struct | Futex_Context |
Macros | |
| #define | FUTEX_TQ_OPERATIONS &_Thread_queue_Operations_FIFO |
Functions | |
| 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().
| int _Futex_Wait | ( | struct _Futex_Control * | _futex, |
| int * | uaddr, | ||
| int | val ) |
Performs the FUTEX_WAIT operation.
| [in,out] | _futex | is the futex object. |
| [in] | uaddr | is the address to the futex state. |
| val | is the expected futex state value. |
| 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. |
| int _Futex_Wake | ( | struct _Futex_Control * | _futex, |
| int | count ) |
Performs the FUTEX_WAKE operation.
| [in,out] | _futex | is the futex object. |
| count | is the maximum count of threads to wake up. |