linux/io_uring_sqe: add prep_cancel_fd

This commit is contained in:
nikneym 2025-02-11 13:17:54 +03:00
parent 8d914ea734
commit ecfd9cef7d

View File

@ -436,6 +436,15 @@ pub const io_uring_sqe = extern struct {
sqe.rw_flags = flags;
}
pub fn prep_cancel_fd(
sqe: *linux.io_uring_sqe,
fd: linux.fd_t,
flags: u32,
) void {
sqe.prep_rw(.ASYNC_CANCEL, fd, 0, 0, 0);
sqe.rw_flags = flags | linux.IORING_ASYNC_CANCEL_FD;
}
pub fn prep_shutdown(
sqe: *linux.io_uring_sqe,
sockfd: linux.socket_t,