io_uring_sqring_wait(3)

✨ io_uring_sqring_wait ✨

okay bestie, we're in the liburing manual and today's main character is io_uring_sqring_wait(3) πŸ’…


πŸŽ€ NAME πŸŽ€

io_uring_sqring_wait β€” the girl who waits for free space in the SQ ring. yes she's patient. yes she's iconic. periodt.


🌸 SYNOPSIS 🌸

#include <liburing.h>

int io_uring_sqring_wait(struct io_uring *ring);

πŸ¦‹ DESCRIPTION πŸ¦‹

so, io_uring_sqring_wait(3) lets whoever's calling it wait for space to free up in the SQ ring that belongs to the ring param 🫢 and like… when does that space free up? when the kernel side thread has consumed one or more entries. that's the whole tea β˜•

and if the SQ ring is currently non-full? no action is taken. she's not gonna make you wait for nothing, she's not that kind of girl πŸ™ˆ

ngl this feature is lowkey exclusive β€” you can only use it when the ring has been setup with IORING_SETUP_SQPOLL, meaning it's using an offloaded approach to request submissions. no SQPOLL, no sqring_wait. it's giving vip list 🎟️

πŸ‘‘ RETURN VALUE πŸ‘‘

on success it returns the free space ✨

if the kernel does not support the feature, -EINVAL is returned 😭 (not her fault, the kernel just wasn't ready for her)


🌈 SEE ALSO 🌈


and that's the whole page, bestie πŸ’– this was liburing-2.1, dated January 25, 2022 β€” slay, bye, go wait on your SQ ring responsibly 🧚⭐

πŸ“¦ where this page comes from