Function futex2_waitv [src]
Given an array of futex_waitv, 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 returned 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...)
Prototype
pub fn futex2_waitv( waiters: [*]futex_waitv, nr_futexes: u32, flags: u32, timeout: ?*const timespec, clockid: clockid_t, ) usize
Parameters
waiters: [*]futex_waitvList of futexes to wait on.
nr_futexes: u32Length of waiters.
flags: u32Flag for timeout (monotonic/realtime).
timeout: ?*const timespecOptional absolute timeout.
clockid: clockid_tClock to be used for the timeout, realtime or monotonic.
Source
pub fn futex2_waitv(
/// List of futexes to wait on.
waiters: [*]futex_waitv,
/// Length of `waiters`.
nr_futexes: u32,
/// Flag for timeout (monotonic/realtime).
flags: u32,
/// Optional absolute timeout.
timeout: ?*const timespec,
/// Clock to be used for the timeout, realtime or monotonic.
clockid: clockid_t,
) usize {
return syscall5(
.futex_waitv,
@intFromPtr(waiters),
nr_futexes,
flags,
@intFromPtr(timeout),
@bitCast(@as(isize, @intFromEnum(clockid))),
);
}