io_uring_get_sqe(3)
β¨ io_uring_get_sqe β bestie edition β¨
okay so this one is from the liburing manual, and it's literally the function that hands you your next submission queue entry. no cap, it's the plug. π«Ά
πΈ NAME πΈ
io_uring_get_sqe β grab the next available submission queue entry off the submission queue π
π¦ SYNOPSIS π¦
#include <liburing.h>
struct io_uring_sqe *io_uring_get_sqe(struct io_uring *ring);
π DESCRIPTION π
so the io_uring_get_sqe(3) function gets you the next available submission queue entry from the submission queue that belongs to the ring param. that's it, that's the job. she's a giver. π
on success, io_uring_get_sqe(3) returns a pointer to that submission queue entry. on failure, it returns NULL. (and if you got NULL, go read RETURN VALUE below, it's giving "queue is full, bestie".)
if a submission queue entry does come back to you, you fill it out with one of the prep functions β like io_uring_prep_read(3), iconic β and then you submit it with io_uring_submit(3). that's the whole flow, no skipping steps. β¨
β οΈ the note that eats, fr fr: neitherio_uring_get_sqenor the prep functions set (or clear) theuser_datafield of the SQE. so if you're expectingio_uring_cqe_get_data(3)orio_uring_cqe_get_data64(3)to return valid data when you're reaping IO completions, then eitherio_uring_sqe_set_data(3)orio_uring_sqe_set_data64(3)MUST have been called before submitting the request. not "should", not "maybe", MUST. periodt. π
β RETURN VALUE β
io_uring_get_sqe(3) returns a pointer to the next submission queue event on success, and NULL on failure.
and if it hands you NULL? that means the SQ ring is currently full, and entries must be submitted for processing before new ones can get allocated. basically: girl, submit your work before you ask for more. π
π SEE ALSO π
and that's the whole page, bestie!! π¦ this came to you from liburing-0.7, dated July 10, 2020 β oldie but a goodie, still serving. go get your SQEs and slay πβ¨
π¦ 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 bookworm: liburing-dev 2.3-3
- 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 noble: liburing-dev 2.5-1build1
- 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) 2020 Jens Axboe <axboe@kernel.dk>
- Copyright (C) 2020 Red Hat, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms