diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-10-27 13:51:14 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-10-29 06:20:51 -0700 |
| commit | a87fd37bf59a975ba057bec408d2908d6168a084 (patch) | |
| tree | e99e0cd6feeb81e7fb334300acedaa93f572dc98 /lib/std | |
| parent | 0caf286a1a9f1f7fe13483d7adbf3f1357b12a1c (diff) | |
| download | zig-a87fd37bf59a975ba057bec408d2908d6168a084.tar.gz zig-a87fd37bf59a975ba057bec408d2908d6168a084.zip | |
std.Io: make Evented equal void when unimplemented
This allows conditional compilation checks.
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/Io.zig | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/std/Io.zig b/lib/std/Io.zig index 1649341afc..0f69f8ed9c 100644 --- a/lib/std/Io.zig +++ b/lib/std/Io.zig @@ -560,8 +560,14 @@ test { const Io = @This(); pub const Evented = switch (builtin.os.tag) { - .linux => @import("Io/IoUring.zig"), - .dragonfly, .freebsd, .netbsd, .openbsd, .macos, .ios, .tvos, .visionos, .watchos => @import("Io/Kqueue.zig"), + .linux => switch (builtin.cpu.arch) { + .x86_64, .aarch64 => @import("Io/IoUring.zig"), + else => void, // context-switching code not implemented yet + }, + .dragonfly, .freebsd, .netbsd, .openbsd, .macos, .ios, .tvos, .visionos, .watchos => switch (builtin.cpu.arch) { + .x86_64, .aarch64 => @import("Io/Kqueue.zig"), + else => void, // context-switching code not implemented yet + }, else => void, }; pub const Threaded = @import("Io/Threaded.zig"); |
