io_uring_register_probe(3)

✨ io_uring_register_probe β€” register probe with io_uring ✨

okay bestie, welcome to the liburing manual, this one's io_uring_register_probe(3) and it's lowkey a little detective mission for your kernel πŸ’…


🌸 SYNOPSIS 🌸

#include <liburing.h>

int io_uring_register_probe(struct io_uring *ring,
                            struct io_uring_probe *p,
                            unsigned nr);

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: io_uring_register_probe(3) goes and asks the kernel which io_uring opcodes it actually supports, and then it fills in the probe structure p with the answer. no cap, it's literally just "hey kernel, whatcha got?" πŸ’–

  • the ring argument is the io_uring instance you're interrogating β€” that's the one getting queried, bestie πŸ”
  • the nr argument is the maximum number of opcodes to query, so it's your little cap on how much you're asking for

The probe structure holds all the tea about which opcodes the kernel supports. Once you've called this function, your app can use io_uring_opcode_supported(3) to check whether one specific opcode is supported. iykyk πŸŽ€

okay but real talk β€” most applications should use io_uring_get_probe(3) or io_uring_get_probe_ring(3) instead, because those ones allocate and fill in the probe structure automatically for you. this function is the manual, do-it-yourself version. no shade, just saying πŸ’…

πŸ‘‘ RETURN VALUE πŸ‘‘

  • returns 0 on success β€” slay ✨
  • on error, it returns a negative errno value 😭

🌈 SEE ALSO 🌈


that's the whole page, bestie, you ate 🫢 this was liburing-2.4, dated January 18, 2025, from the liburing manual β€” mwah, go probe something iconic πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from