Function futex_waitv
pub unsafe fn futex_waitv(
waiters: &[futex_waitv_t],
flags: u32,
timeout: Option<×pec_t>,
clockid: i32,
) -> Result<i32, i32> ⓘ
dep_nc
only.Expand description
Wait on a list of futexes.
waiters
: List of futexes to wait onnr_futexes
: Length of futexvflags
: Flag for timeout (monotonic/realtime)timeout
: Optional absolute timeout.clockid
: Clock to be used for the timeout, realtime or monotonic.
Given an array of struct futex_waitv_t
, wait on each uaddr.
The thread wakes if a futex_wake()
is performed at any uaddr.
The syscall returns immediately if any waiter has *uaddr != val
.
timeout
is an optional timeout value for the operation.
Each waiter has individual flags. The flags
argument for the syscall
should be used solely for specifying the timeout as realtime, if needed.
Flags for private futexes, sizes, etc. should be used on the individual flags
of each waiter.
Returns the array index of one of the woken futexes. No further information is provided: any number of other futexes may also have been woken by the same event, and if more than one futex was woken, the retrned index may refer to any one of them. (It is not necessaryily the futex with the smallest index, nor the one most recently woken, nor…)