io_uring_wait_cqe_timeout(3)

NAME
io_uring_wait_cqe_timeout - wait for one io_uring completion event with timeout

SYNOPSIS
#include <liburing.h>

int io_uring_wait_cqe_timeout(struct io_uring *ring,
                              struct io_uring_cqe **cqe_ptr,
                              struct __kernel_timespec *ts);

DESCRIPTION

The io_uring_wait_cqe_timeout(3) function waits for one IO completion to be available from the queue belonging to the ring param, waiting for it if necessary or until the timeout ts expires. If an event is already available in the ring when invoked, no waiting will occur. The cqe_ptr param is filled in on success. If ts is specified and an older kernel without IORING_FEAT_EXT_ARG is used, the application does not need to call io_uring_submit(3) before calling io_uring_wait_cqes(3). For newer kernels with that feature flag set, there is no implied submit when waiting for a request.

RETURN VALUE
On success io_uring_wait_cqe_timeout(3) returns 0 and the cqe_ptr param is filled in. On failure it returns -errno. The return value indicates the result of waiting for a CQE, and it has no relation to the CQE result itself.

SEE ALSO
io_uring_submit(3), io_uring_wait_cqes(3), io_uring_wait_cqe(3)