io_uring_cq_eventfd_toggle(3)
β¨ io_uring_cq_eventfd_toggle β¨
okay bestie, welcome to liburing's lil switch-flip function π
this one lives in section 3 of the manual, so it's a library call, not a command you type in your shell β keep that in mind π
πΈ SYNOPSIS πΈ
#include <liburing.h>
int io_uring_cq_eventfd_toggle(struct io_uring *ring, bool enabled);
π¦ DESCRIPTION π¦
so io_uring_cq_eventfd_toggle(3) is literally just a toggle for eventfd notifications on the io_uring instance you point at with ring π«Ά
- if
enabledistrue, eventfd notifications are enabled β¨ - if
enabledisfalse, they are disabled π
lowkey important: you have to register an eventfd with the ring first, usingio_uring_register_eventfd(3)orio_uring_register_eventfd_async(3), before this function will even work. no registered eventfd, no toggle, no cap π
when is this giving useful? it's the move when your app wants to temporarily stop receiving eventfd notifications β like, say, during a batch processing phase π super handy when you don't want to be pinged mid-grind, yk?
π RETURN VALUE π
returns 0 on success π on error, you get a negative errno value back:
-EOPNOTSUPPβ the kernel does not support toggling eventfd notifications, or no eventfd is registered π
π SEE ALSO π
and that's the whole page, periodt π β¨ go toggle ur notifications, main character π¦
this was liburing-2.4, dated January 18, 2025, from the liburing Manual β mwah, stan ππ
π¦ where this page comes from
- 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
- nixpkgs unstable: liburing 2.14
- 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) 2025 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