io_uring_enable_rings(3)
β¨ io_uring_enable_rings β the glow-up button for your ring π
okay bestie, we're talking about io_uring_enable_rings(3), from the liburing Manual. she's a little function with one job and she does it flawlessly, no cap π«Ά
πΈ NAME πΈ
io_uring_enable_rings β enable a disabled ring β¨
π¦ SYNOPSIS π¦
#include <liburing.h>
int io_uring_enable_rings(struct io_uring *ring);
like. that's it. that's the whole vibe. one include, one call. iconic behavior honestly π
π DESCRIPTION π
so here's the tea π: you can create a ring in a whole paused state β fully built, just not allowed to do anything yet β by passing the IORING_SETUP_R_DISABLED flag to io_uring_queue_init(3). it's giving "born ready but on do-not-disturb mode" π
then when you're finally ready to let her cook, you hit her with io_uring_enable_rings(3) and boom π₯ β the ring is enabled, the DND is off, we're live.
and fr fr, this is the important part: while that ring is still disabled, it is not possible to submit work to it. like, zero. none. not until this function has been successfully called. no shortcuts, no sneaking around it, periodt π
so the order is literally: create with the flag β‘οΈ call this function β‘οΈ then you may submit. that's the whole storyline, main character energy from start to finish π
π RETURN VALUE π
0β slay! success, we ate, the ring is enabled π- negative error code β something went sideways, check below
and a lil note that matters a lot: it does not write to errno. so don't go staring at errno wondering why it's empty, bestie, the answer was in the return value the whole time π
π ERRORS π
EBADFDβ the ring was not disabled. yeah, you tried to enable something that was already enabled. it's giving "turning on a light that's already on" π nothing was wrong with the ring, it just wasn't in the state you thought it was in.
π SEE ALSO π
io_uring_queue_init(3)β where you'd setIORING_SETUP_R_DISABLEDin the first place, the origin story πio_uring_register(2)io_uring_setup(2)
π§ a lil sign-off π§
this page lives in liburing-2.7, dated July 26, 2024, and it's literally titled io_uring_enable_rings(3) if you ever need to cite her. go enable some rings, bestie, you got this πβ¨
π¦ 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
- alpine 3.24: liburing-doc 2.14-r0 Β· LGPL-2.1-or-later OR MIT
- arch rolling: liburing 2.15-1 Β· GPL-2.0-only WITH Linux-syscall-note OR MIT AND LGPL-2.0-or-later AND 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)
- nixpkgs unstable: liburing 2.14
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- ubuntu questing: liburing-dev 2.11-1
- ubuntu resolute: liburing-dev 2.14-1
- ubuntu stonking: liburing-dev 2.15-1
- π the page's license: LGPL-2.0-or-later
- Copyright (C) 2023 nick black <dankamongmen@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms