mirror of
https://github.com/ziglang/zig.git
synced 2025-12-08 07:13:08 +00:00
Use io_uring_prep_rw in io_uring_prep_cancel
follow liburing's API as closely as possible. Signed-off-by: Hiroaki Nakamura <hnakamur@gmail.com>
This commit is contained in:
parent
2a54c2ff19
commit
77d1d5839a
@ -1170,21 +1170,8 @@ pub fn io_uring_prep_cancel(
|
|||||||
cancel_user_data: u64,
|
cancel_user_data: u64,
|
||||||
flags: u32,
|
flags: u32,
|
||||||
) void {
|
) void {
|
||||||
sqe.* = .{
|
io_uring_prep_rw(.ASYNC_CANCEL, sqe, -1, cancel_user_data, 0, 0);
|
||||||
.opcode = .ASYNC_CANCEL,
|
sqe.rw_flags = flags;
|
||||||
.flags = 0,
|
|
||||||
.ioprio = 0,
|
|
||||||
.fd = -1,
|
|
||||||
.off = 0,
|
|
||||||
.addr = cancel_user_data,
|
|
||||||
.len = 0,
|
|
||||||
.rw_flags = flags,
|
|
||||||
.user_data = 0,
|
|
||||||
.buf_index = 0,
|
|
||||||
.personality = 0,
|
|
||||||
.splice_fd_in = 0,
|
|
||||||
.__pad2 = [2]u64{ 0, 0 },
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
test "structs/offsets/entries" {
|
test "structs/offsets/entries" {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user