authorgravatar for hnakamur@gmail.comHiroaki Nakamura <hnakamur@gmail.com> 2021-11-09 00:52:02+09:00
committergravatar for hnakamur@gmail.comHiroaki Nakamura <hnakamur@gmail.com> 2021-11-12 10:51:49+09:00
log77d1d5839aaa24564d10f334f50bb3995fa7c83c
tree3f75c59997ece10abbb42142c5b60d3f3767f727
parent2a54c2ff199f9f93dc50d9d1d98e32a9bb8423e3

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>

1 files changed, 2 insertions(+), 15 deletions(-)

lib/std/os/linux/io_uring.zig+2-15
...@@ -1170,21 +1170,8 @@ pub fn io_uring_prep_cancel(...@@ -1170,21 +1170,8 @@ pub fn io_uring_prep_cancel(
1170 cancel_user_data: u64,1170 cancel_user_data: u64,
1171 flags: u32,1171 flags: u32,
1172) void {1172) void {
1173 sqe.* = .{1173 io_uring_prep_rw(.ASYNC_CANCEL, sqe, -1, cancel_user_data, 0, 0);
1174 .opcode = .ASYNC_CANCEL,1174 sqe.rw_flags = flags;
1175 .flags = 0,
1176 .ioprio = 0,
1177 .fd = -1,
1178 .off = 0,
1179 .addr = cancel_user_data,
1180 .len = 0,
1181 .rw_flags = flags,
1182 .user_data = 0,
1183 .buf_index = 0,
1184 .personality = 0,
1185 .splice_fd_in = 0,
1186 .__pad2 = [2]u64{ 0, 0 },
1187 };
1188}1175}
11891176
1190test "structs/offsets/entries" {1177test "structs/offsets/entries" {