zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 61ec6cb6d375ff896d892102d8ee7b7d4536b3a5 (tree)
parent c5b4fcaa1cf4eaa721b5b2abfa0805cc3bbb29e2
Author: Joran Dirk Greef <joran@ronomon.com>
Date:   Sun,  4 Oct 2020 12:48:08 +0200

Expose available kernel features

Diffstat:
Mlib/std/os/linux/io_uring.zig | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/std/os/linux/io_uring.zig b/lib/std/os/linux/io_uring.zig @@ -6,6 +6,8 @@ const std = @import("../../std.zig"); const assert = std.debug.assert; const builtin = std.builtin; +const mem = std.mem; +const net = std.net; const os = std.os; const linux = os.linux; const testing = std.testing; @@ -19,6 +21,7 @@ pub const IO_Uring = struct { sq: SubmissionQueue, cq: CompletionQueue, flags: u32, + features: u32, /// A friendly way to setup an io_uring, with default io_uring_params. /// `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 { .fd = fd, .sq = sq, .cq = cq, - .flags = p.flags + .flags = p.flags, + .features = p.features }; }