1io_uring_wait_cqes(3) liburing Manual io_uring_wait_cqes(3)
2
3
4
6 io_uring_wait_cqes - wait for one or more io_uring completion events
7
9 #include <liburing.h>
10
11 int io_uring_wait_cqes(struct io_uring *ring,
12 struct io_uring_cqe **cqe_ptr,
13 unsigned wait_nr,
14 struct __kernel_timespec *ts,
15 sigset_t *sigmask);
16
18 The io_uring_wait_cqes(3) function returns wait_nr IO completions from
19 the queue belonging to the ring param, waiting for them if necessary or
20 until the timeout ts expires. The sigmask specifies the set of signals
21 to block. The prevailing signal mask is restored before returning.
22
23 The cqe_ptr param is filled in on success with the first CQE. Callers
24 of this function should use io_uring_for_each_cqe(3) to iterate all
25 available CQEs.
26
27 If ts is specified and an older kernel without IORING_FEAT_EXT_ARG is
28 used, the application does not need to call io_uring_submit(3) before
29 calling io_uring_wait_cqes(3). For newer kernels with that feature
30 flag set, there is no implied submit when waiting for a request.
31
32
34 On success io_uring_wait_cqes(3) returns 0 and the cqe_ptr param is
35 filled in. On failure it returns -errno.
36
38 io_uring_submit(3), io_uring_for_each_cqe(3), io_uring_wait_cqe_time‐
39 out(3), io_uring_wait_cqe(3)
40
41
42
43liburing-2.1 November 15, 2021 io_uring_wait_cqes(3)