io_uring_prep_epoll_ctl(3)
π io_uring_prep_epoll_ctl β bestie edition
okay so this is a page from the liburing Manual, and it's literally about prepping an epoll_ctl request. no cap, it's short, it's sweet, and it's giving β¨asyncβ¨. let's get into it π«Ά
β¨ NAME β¨
io_uring_prep_epoll_ctl β prepare an epoll_ctl request π
πΈ SYNOPSIS πΈ
#include <liburing.h>
void io_uring_prep_epoll_ctl(struct io_uring_sqe *sqe,
int epfd,
int fd,
int op,
const struct epoll_event *ev);
π¦ DESCRIPTION π¦
so basically, the io_uring_prep_epoll_ctl(3) function gets an epoll control request all set up and ready to slay. your submission queue entry sqe gets configured to use the epoll instance that epfd points to, and it performs the operation op on the file descriptor fd. and the ev argument? that's a pointer to an epoll_event structure, exactly as it's defined in epoll_ctl(2). periodt π
the op argument can be one of these three, and ngl they're all iconic in their own way:
EPOLL_CTL_ADDβ addsfdto the epoll instance πEPOLL_CTL_MODβ modifies the settings forfdβ¨EPOLL_CTL_DELβ removesfdfrom the epoll instance. and heads up bestie:evis ignored for this operation π
this function prepares an async epoll_ctl(2) request. so like, go read that man page for the deets, fr fr π
π RETURN VALUE π
none. that's it. nothing. the void. π (jk, the actual result shows up in the CQE, keep reading π)
π ERRORS π
the res field of the CQE is where the result of the operation lives β it's 0 on success π. and if things go wrong? you get a negative errno value π. for the possible error values, check epoll_ctl(2), iykyk.
β SEE ALSO β
and that's the whole page, bestie π«Ά this was liburing-2.4, dated January 18, 2025. go prep some epoll requests, you're doing amazing sweetie πβ¨πΈ
π¦ 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