table of contents
| io_uring_register_reg_wait(3) | liburing Manual | io_uring_register_reg_wait(3) |
NAME¶
io_uring_register_reg_wait - Registers fixed wait regions
SYNOPSIS¶
#include <liburing.h>
int io_uring_register_reg_wait(struct io_uring *ring,
struct io_uring_reg_wait *reg,
int nr);
DESCRIPTION¶
The io_uring_register_reg_wait(3) registers a fixed wait region starting at reg and of nentries entries with the ring indicated by ring.
This function works like io_uring_setup_reg_wait(3), except it doesn't allocate any memory on behalf of the application. The application must pass in previously allocated memory in reg, which must be of the right size to hold nr entries and suitably aligned on a page boundary.
The memory registered should not be freed until the ring for which it is registered is closed.
Once a wait region has been setup, it persists for the life time of the ring. It's currently not possible to unregister or resize a wait region. Additionally, a wait region may currently only use a single page of memory. On a 4k page size system, this means an application is limited to 64 wait regions. That should be enough, as each wait index may be modified as needed. With at least 64 indices available, hopefully applications can just use the appropriately setup wait region for each specific type of wait, with different indices having different wait settings.
Available since kernel 6.13.
RETURN VALUE¶
On success io_uring_register_reg_wait(3) returns 0 . On failure, it returns a -errno value.
SEE ALSO¶
| November 2, 2024 | liburing-2.9 |