aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os/linux/io_uring.zig
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/os/linux/io_uring.zig')
-rw-r--r--lib/std/os/linux/io_uring.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/std/os/linux/io_uring.zig b/lib/std/os/linux/io_uring.zig
index b47d4c7b32..340020cf9b 100644
--- a/lib/std/os/linux/io_uring.zig
+++ b/lib/std/os/linux/io_uring.zig
@@ -526,7 +526,7 @@ pub const IO_Uring = struct {
pub fn timeout(
self: *IO_Uring,
user_data: u64,
- ts: *const os.timespec,
+ ts: *const os.__kernel_timespec,
count: u32,
flags: u32,
) !*io_uring_sqe {
@@ -884,7 +884,7 @@ pub fn io_uring_prep_close(sqe: *io_uring_sqe, fd: os.fd_t) void {
pub fn io_uring_prep_timeout(
sqe: *io_uring_sqe,
- ts: *const os.timespec,
+ ts: *const os.__kernel_timespec,
count: u32,
flags: u32,
) void {
@@ -1339,7 +1339,7 @@ test "timeout (after a relative time)" {
const ms = 10;
const margin = 5;
- const ts = os.timespec{ .tv_sec = 0, .tv_nsec = ms * 1000000 };
+ const ts = os.__kernel_timespec{ .tv_sec = 0, .tv_nsec = ms * 1000000 };
const started = std.time.milliTimestamp();
const sqe = try ring.timeout(0x55555555, &ts, 0, 0);
@@ -1366,7 +1366,7 @@ test "timeout (after a number of completions)" {
};
defer ring.deinit();
- const ts = os.timespec{ .tv_sec = 3, .tv_nsec = 0 };
+ const ts = os.__kernel_timespec{ .tv_sec = 3, .tv_nsec = 0 };
const count_completions: u64 = 1;
const sqe_timeout = try ring.timeout(0x66666666, &ts, count_completions, 0);
testing.expectEqual(linux.IORING_OP.TIMEOUT, sqe_timeout.opcode);
@@ -1399,7 +1399,7 @@ test "timeout_remove" {
};
defer ring.deinit();
- const ts = os.timespec{ .tv_sec = 3, .tv_nsec = 0 };
+ const ts = os.__kernel_timespec{ .tv_sec = 3, .tv_nsec = 0 };
const sqe_timeout = try ring.timeout(0x88888888, &ts, 0, 0);
testing.expectEqual(linux.IORING_OP.TIMEOUT, sqe_timeout.opcode);
testing.expectEqual(@as(u64, 0x88888888), sqe_timeout.user_data);