|
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | SEE ALSO | COLOPHON |
|
|
|
io_uring_su...nd_wait_reg(3) liburing Manual io_uring_su...nd_wait_reg(3)
io_uring_submit_and_wait_reg - Sets up and registers fixed wait
regions
#include <liburing.h>
int io_uring_submit_and_wait_reg(struct io_uring *ring,
struct io_uring_cqe **cqe_ptr,
unsigned wait_nr,
int reg_index);
The io_uring_submit_and_wait_reg(3) submits previously prepared
requests in the ring ring and waits for wait_nr completions using
the registered wait index of reg_index. Upon successful return,
the completion events are stored in the cqe_ptr array.
This function works like io_uring_submit_and_wait_min_timeout(3)
in that it supports all the features of that helper, but rather
than pass in all the information in a struct that needs copying,
it references a registered wait index for which previously
registered wait region holds information about how the wait should
be performed. That includes information such as the overall
timeout, the minimum timeout to be used, and so forth. See
io_uring_setup_reg_wait(3) for the details on registered wait
regions.
Using registered wait regions has less overhead then other wait
methods, as no copying of data is needed.
It's valid to use this function purely for waiting on events, even
if no new requests should be submitted.
On success io_uring_submit_and_wait_reg(3) returns the number of
new requests submitted. On failure it returns -errno. If the
kernel doesn't support this functionality, -EINVAL will be
returned. If no events are submitted and the wait operation times
out, then -ETIME will be returned.
io_uring_setup_reg_wait(3),
io_uring_submit_and_wait_min_timeout(3),
io_uring_submit_and_wait_timeout(3)
This page is part of the liburing (A library for io_uring)
project. Information about the project can be found at
⟨https://github.com/axboe/liburing⟩. If you have a bug report for
this manual page, send it to io-uring@vger.kernel.org. This page
was obtained from the project's upstream Git repository
⟨https://github.com/axboe/liburing⟩ on 2025-08-11. (At that time,
the date of the most recent commit that was found in the
repository was 2025-08-02.) If you discover any rendering
problems in this HTML version of the page, or you believe there is
a better or more up-to-date source for the page, or you have
corrections or improvements to the information in this COLOPHON
(which is not part of the original manual page), send a mail to
man-pages@man7.org
liburing-2.9 November 2, 2024io_uring_su...nd_wait_reg(3)
Pages that refer to this page: io_uring_free_reg_wait(3), io_uring_register_reg_wait(3), io_uring_setup_reg_wait(3), io_uring_submit_and_wait_reg(3)