iom_requeue(3)
π iom_requeue β re-add event to I/O multiplexer π
okay bestie, this is the manual page for iom_requeue(3) from the Library Functions Manual and she's a lil icon of the libowfat I/O multiplexer world π
β¨ NAME β¨
iom_requeue β re-add event to I/O multiplexer π«Ά
β¨ SYNTAX β¨
#include <libowfat/io.h>
int iom_requeue(iomux_t* c, int64 fd, unsigned int events);
β¨ DESCRIPTION β¨
so iom_requeue literally adds an event you're interested in to an I/O multiplexer. that's the whole vibe π
fd is the file descriptor (usually a socket, iykyk) that you're interested in, and events is the operation you want to do. it can be IOM_READ or IOM_WRITE. those are your two options, periodt.
if that operation becomes possible on that descriptor, iom_wait will return and tell you the fd and the event. slay π
β οΈ okay important β the event registration is removed from theiomux_tcontext if it occurs. so you'll have to calliom_requeueagain if you're interested in more events for this descriptor. it's giving "one and done" energy, fr fr.
and the timing matters, bestie: do this only after you're done handling this event, otherwise iom_wait might indicate a new event to another thread while this thread is still working on the descriptor, leading to unexpected behavior π (we do NOT want unexpected behavior, that's not the vibe).
also bestie, closing a file descriptor with registered events will discard the event registration. she's gone, no cap π
β¨ LINKING β¨
you may have to add -lpthread to the command line in the linking step. that's it, that's the whole section π₯
β¨ RETURN VALUE β¨
0β success, we ate π-1β error, and it setserrnoπ
β¨ SEE ALSO β¨
iom_initiom_addiom_waitiom_abort
the whole friend group, go say hi π¦
and that's the tea, bestie π this was iom_requeue(3) living in the Library Functions Manual β go forth, requeue responsibly, and stay iconic πβ¨
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms