pub fn futex2_wait(
/// Address of the futex to wait on.
uaddr: *const anyopaque,
/// Value of `uaddr`.
val: usize,
/// Bitmask to match against incoming wakeup masks. Must not be zero.
mask: usize,
flags: FUTEX2_FLAGS,
/// Optional absolute timeout. Always 64-bit, even on 32-bit platforms.
timeout: ?*const kernel_timespec,
/// Clock to be used for the timeout, realtime or monotonic.
clockid: clockid_t,
) usize uaddr: *const anyopaqueAddress of the futex to wait on.
val: usizeValue of uaddr.
mask: usizeBitmask to match against incoming wakeup masks. Must not be zero.
flags: FUTEX2_FLAGStimeout: ?*const kernel_timespecOptional absolute timeout. Always 64-bit, even on 32-bit platforms.
clockid: clockid_tClock to be used for the timeout, realtime or monotonic.
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980pub fn futex2_wait(
/// Address of the futex to wait on.
uaddr: *const anyopaque,
/// Value of `uaddr`.
val: usize,
/// Bitmask to match against incoming wakeup masks. Must not be zero.
mask: usize,
flags: FUTEX2_FLAGS,
/// Optional absolute timeout. Always 64-bit, even on 32-bit platforms.
timeout: ?*const kernel_timespec,
/// Clock to be used for the timeout, realtime or monotonic.
clockid: clockid_t,
) usize {
return syscall6(
.futex_wait,
@intFromPtr(uaddr),
val,
mask,
@as(u32, @bitCast(flags)),
@intFromPtr(timeout),
@backingInt(clockid),
);
}
Wait on a single futex. Identical to the futex v1
FUTEX.FUTEX_WAIT_BITSETop, except it is part of the futex2 family of calls.Requires at least kernel v6.7.