authorgravatar for joran@ronomon.comJoran Dirk Greef <joran@ronomon.com> 2020-10-04 12:48:08+02:00
committergravatar for joran@ronomon.comJoran Dirk Greef <joran@ronomon.com> 2020-10-04 12:48:08+02:00
log61ec6cb6d375ff896d892102d8ee7b7d4536b3a5
tree11f2d2b658e8f13c02413a723d116523484dd490
parentc5b4fcaa1cf4eaa721b5b2abfa0805cc3bbb29e2

Expose available kernel features


1 files changed, 5 insertions(+), 1 deletions(-)

lib/std/os/linux/io_uring.zig+5-1
...@@ -6,6 +6,8 @@...@@ -6,6 +6,8 @@
6const std = @import("../../std.zig");6const std = @import("../../std.zig");
7const assert = std.debug.assert;7const assert = std.debug.assert;
8const builtin = std.builtin;8const builtin = std.builtin;
9const mem = std.mem;
10const net = std.net;
9const os = std.os;11const os = std.os;
10const linux = os.linux;12const linux = os.linux;
11const testing = std.testing;13const testing = std.testing;
...@@ -19,6 +21,7 @@ pub const IO_Uring = struct {...@@ -19,6 +21,7 @@ pub const IO_Uring = struct {
19 sq: SubmissionQueue,21 sq: SubmissionQueue,
20 cq: CompletionQueue,22 cq: CompletionQueue,
21 flags: u32,23 flags: u32,
24 features: u32,
2225
23 /// A friendly way to setup an io_uring, with default io_uring_params.26 /// A friendly way to setup an io_uring, with default io_uring_params.
24 /// `entries` must be a power of two between 1 and 4096, although the kernel will make the final27 /// `entries` must be a power of two between 1 and 4096, although the kernel will make the final
...@@ -126,7 +129,8 @@ pub const IO_Uring = struct {...@@ -126,7 +129,8 @@ pub const IO_Uring = struct {
126 .fd = fd,129 .fd = fd,
127 .sq = sq,130 .sq = sq,
128 .cq = cq,131 .cq = cq,
129 .flags = p.flags132 .flags = p.flags,
133 .features = p.features
130 };134 };
131 }135 }
132136