io_uring_register_reg_wait(3)
β¨ NAME β¨
io_uring_register_reg_wait β registers fixed wait regions π
okay bestie, welcome to the liburing manual (yes, that manual, the one that lives in section 3, we love her) β let's get into it π
πΈ SYNOPSIS πΈ
#include <liburing.h>
int io_uring_register_reg_wait(struct io_uring *ring,
struct io_uring_reg_wait *reg,
int nr);
π¦ DESCRIPTION π¦
So io_uring_register_reg_wait(3) does one thing and it does it well: it registers a fixed wait region that starts at reg and holds nentries entries, on the ring you pass in as ring. Periodt. π
She's giving very much the same energy as io_uring_setup_reg_wait(3), with one iconic difference: she does not allocate any memory on behalf of your application. Nope, not a single byte. That's your job, bestie. You have to hand her memory you already allocated in reg, and that memory needs to be:
- the right size to hold
nrentries, and - suitably aligned on a page boundary β¨
π«Ά Lowkey important: that registered memory should not be freed until the ring it's registered for is closed. Don't do it. She will know.
Once a wait region has been setup, it persists for the life time of the ring. And rn? It's currently not possible to unregister or resize a wait region β so pick your layout like the main character you are π
Also, a wait region may currently only use a single page of memory. On a 4k page size system, that means an application is limited to 64 wait regions. And honestly? That should be enough, because 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. Ate. π₯
Available since kernel 6.13. iykyk π
π RETURN VALUE π
- On success,
io_uring_register_reg_wait(3)returns0β - On failure, it returns a
-errnovalue π
π SEE ALSO π
and that's the whole vibe check, bestie π§ this was liburing-2.9, dated November 2, 2024 β go forth and register your wait regions responsibly, mwah ππ
β¨
π¦ where this page comes from
- alpine 3.22: liburing-doc 2.9-r0 Β· LGPL-2.1-or-later OR MIT
- alpine 3.23: liburing-doc 2.12-r0 Β· LGPL-2.1-or-later OR MIT
- centos-stream 10: liburing-devel 2.12-1.el10 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- centos-stream 9: liburing-devel 2.12-1.el9 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- centos-stream 9: liburing-devel 2.12-1.el9 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- debian trixie: liburing-dev 2.9-1
- fedora 43: liburing-devel 2.9-2.fc43 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 43: liburing-devel 2.9-2.fc43 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 44: liburing-devel 2.13-2.fc44 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 44: liburing-devel 2.13-2.fc44 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- ubuntu questing: liburing-dev 2.11-1
- π the page's license: LGPL-2.0-or-later
- Copyright (C) 2024 Jens Axboe <axboe@kernel.dk>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms