io_queue_run(3)
π io_queue_run(3) β Linux AIO, bestie edition π
okay so. welcome to the io_queue_run(3) page, part of the Linux AIO manual, and honestly? she's short but she's mighty. grab a snack, we're doing asynchronous I/O together π¦
β¨ NAME β¨
io_queue_run β handle completed io requests π
like, it deals with the io requests that are already done. the finished ones. the ones that ate and left no crumbs π₯
πΈ SYNOPSIS πΈ
#include <errno.h>
#include <libaio.h>
int io_queue_run(io_context_t ctx);
that's it. that's the whole signature. one function, one argument, zero drama π
π DESCRIPTION π
okay bestie so here's the vibe: io_queue_run() attempts to read all the events from the completion queue for the aio_context specified by ctx.
all of them. not some. not a few. all. she's thorough, she's committed, she's giving main character energy π
β RETURN VALUES β
- May return
0if no events are available. lowkey a mood, honestly β sometimes the queue is just empty and that's fine π - Will fail with
-ENOSYSif not implemented. π
π ERRORS π
okay so when things go wrong, they go wrong like this:
EFAULTβiocbsreferenced data outside of the program's accessible address space. not her reaching into places she shouldn't be πEINVALβctxrefers to an uninitialized aio context, theiocbpointed to byiocbscontains an improperly initializediocb. bestie the context is NOT ready, do not pass go π«ENOSYSβ Not implemented. it's giving "sorry babe, this feature didn't make it" π
π«Ά SEE ALSO π«Ά
the whole friend group, no cap:
io(3), io_cancel(3), io_fsync(3), io_getevents(3), io_prep_fsync(3), io_prep_pread(3), io_prep_pwrite(3), io_queue_init(3), io_queue_release(3), io_queue_wait(3), io_set_callback(3), io_submit(3), errno(3).
reminder bestie: keep yourctxinitialized and youriocbsinside your own address space, or the errors section will come for you π
and that's the page!! β¨ this one came from the Linux manual, dated 2019-07-23 β so yes, she's an older icon but she still slays. mwah, go handle those completed io requests, ily ππ
π¦ where this page comes from
- alpine 3.22: libaio-doc 0.3.113-r2 Β· LGPL-2.1-or-later
- alpine 3.23: libaio-doc 0.3.113-r2 Β· LGPL-2.1-or-later
- alpine 3.24: libaio-doc 0.3.113-r2 Β· LGPL-2.1-or-later
- arch rolling: libaio 0.3.113-5 Β· LGPL-2.0-or-later
- debian bookworm: libaio-dev 0.3.113-4 Β· LGPL-2.1-or-later
- debian trixie: libaio-dev 0.3.113-8+b1 Β· LGPL-2.1-or-later
- ubuntu jammy: libaio-dev 0.3.112-13build1 Β· LGPL-2.1-or-later
- ubuntu noble: libaio-dev 0.3.113-6build1 Β· LGPL-2.1-or-later
- ubuntu noble: libaio-dev 0.3.113-6build1.1 Β· LGPL-2.1-or-later
- ubuntu questing: libaio-dev 0.3.113-8
- ubuntu resolute: libaio-dev 0.3.113-8build1 Β· LGPL-2.1-or-later
- ubuntu stonking: libaio-dev 0.3.113-9 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms