SPDX-License-Identifier: LGPL-2.0-or-later
#include <linux/futex.h> #include <unistd.h> #include <liburing.h>"void io_uring_prep_futex_wait(struct io_uring_sqe *" sqe "," " uint32_t *" futex "," " uint64_t " val "," " uint64_t " mask "," " uint32_t " futex_flags "," " unsigned int " flags ");"
The io_uring_prep_futex_wait (3) function prepares a futex wait request. The submission queue entry sqe is setup for waiting on a futex at address futex and which still has the value val and with futex2 (2) flags of futex_flags and io_uring futex flags of flags . mask can be set to a specific bitset mask, which will be matched by the waking side to decide who to wake up. To always get woken, an application may use FUTEX_BITSET_MATCH_ANY . futex_flags follows the futex2 (2) flags, not the futex (2) v1 interface flags. flags are currently unused and hence 0 must be passed. This function prepares an async futex (2) wait request. See that man page for details. Note that the io_uring futex wait request is similar to the FUTEX_WAIT_BITSET operation, as FUTEX_WAIT is a strict subset of that. Available since kernel 6.7.