io_uring_reg...r_sync_cancel(3)
π NAME π
io_uring_register_sync_cancel β bestie, this one fires off a synchronous cancelation request. no cap.
β¨ SYNOPSIS β¨
#include <liburing.h>
int io_uring_register_sync_cancel(struct io_uring *ring,
struct io_uring_sync_cancel_reg *reg);
π¦ DESCRIPTION π¦
okay so. The io_uring_register_sync_cancel(3) function does a synchronous cancelation request based on whatever params you dropped into reg. it's giving "cancel it and actually wait for the answer" energy. π
The reg argument? You must fill it in with the right info for your cancelation request, bestie. no vibes-only submissions. It looks like this:
struct io_uring_sync_cancel_reg {
__u64 addr;
__s32 fd;
__u32 flags;
struct __kernel_timespec timeout;
__u8 opcode;
__u8 pad[7];
__u64 pad2[3];
};
The arguments are largely mirroring what the async prep functions support β so like, go read io_uring_prep_cancel(3) for the deets. πΈ And similarly, the return value is the same too, same girl different function.
The exception is the timeout argument, which you can use to limit how long the kernel will wait for cancelations to actually succeed. If the tv_sec and tv_nsec values are set to anything but -1UL, then they indicate a relative timeout that cancelations should be completed by. ticking clock, bestie. β°
β οΈ the pad values MUST be zero filled. like actually. zero. filled. don't play. π
π RETURN VALUE π
See io_uring_prep_cancel(3) for the details on the return value β it's the same story. π
If timeout is set to indicate a timeout, then -ETIME will be returned if it gets exceeded. π
And if an unknown value is set in the request, or if the pad values are not cleared to zero, then -EINVAL is returned. so clean your pads. periodt. π
π SEE ALSO π
okay that's the whole page, mwah π«Ά this was the liburing Manual, liburing-2.3, dated September 21 β and yes she's an icon, she's a legend, and she is the moment. πβ¨π
π¦ 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 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
- 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) 2022 Jens Axboe <axboe@kernel.dk>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms