NAME |SYNOPSIS |DESCRIPTION |RETURN VALUE |SEE ALSO |COLOPHON | |
io_uring_su...nd_wait_reg(3) liburing Manualio_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,unsignedwait_nr,intreg_index);
Theio_uring_submit_and_wait_reg(3) submits previously prepared requests in the ringring and waits forwait_nr completions using the registered wait index ofreg_index. Upon successful return, the completion events are stored in thecqe_ptr array. This function works likeio_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. Seeio_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 successio_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,-EINVALwill be returned. If no events are submitted and the wait operation times out, then-ETIMEwill 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 theliburing (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 isnot part of the original manual page), send a mail to man-pages@man7.orgliburing-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)
HTML rendering created 2025-09-06 byMichael Kerrisk, author ofThe Linux Programming Interface. For details of in-depthLinux/UNIX system programming training courses that I teach, lookhere. Hosting byjambit GmbH. | ![]() |