summaryrefslogtreecommitdiff
path: root/9proc/demo
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-21 14:38:16 -0300
committerGabriel Schneider <[email protected]>2026-10-21 14:44:48 -0300
commitd5c37d9122240fe95d308fbe15874e14dd786c5a (patch)
tree3ed108d2af5bd7a5cb07491b16e855e5243b5d63 /9proc/demo
parentfe9772b178575fcab93de09fc61c2f13db7db1a8 (diff)
downloadcloud9-d5c37d9122240fe95d308fbe15874e14dd786c5a.tar.gz
cloud9-d5c37d9122240fe95d308fbe15874e14dd786c5a.zip
Build with Zig 0.17
Diffstat (limited to '9proc/demo')
-rw-r--r--9proc/demo/main.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/9proc/demo/main.zig b/9proc/demo/main.zig
index df06369..c26dfeb 100644
--- a/9proc/demo/main.zig
+++ b/9proc/demo/main.zig
@@ -175,13 +175,13 @@ inline fn napMs(ms: u64) void {
switch (builtin.cpu.arch) {
.x86_64 => _ = asm volatile ("syscall"
: [ret] "={rax}" (-> usize),
- : [number] "{rax}" (@intFromEnum(linux.SYS.nanosleep)),
+ : [number] "{rax}" (@backingInt(linux.SYS.nanosleep)),
[arg1] "{rdi}" (@intFromPtr(&req)),
[arg2] "{rsi}" (@as(usize, 0)),
: .{ .rcx = true, .r11 = true, .memory = true }),
.aarch64 => _ = asm volatile ("svc #0"
: [ret] "={x0}" (-> usize),
- : [number] "{x8}" (@intFromEnum(linux.SYS.nanosleep)),
+ : [number] "{x8}" (@backingInt(linux.SYS.nanosleep)),
[arg1] "{x0}" (@intFromPtr(&req)),
[arg2] "{x1}" (@as(usize, 0)),
: .{ .memory = true }),
@@ -260,7 +260,7 @@ pub fn main(init: std.process.Init) !void {
fn run(init: std.process.Init) !void {
// Transparent huge pages would back the first touched page of every
// client buffer with 2 MiB. Best effort: ignore failure.
- _ = linux.prctl(@intFromEnum(linux.PR.SET_THP_DISABLE), 1, 0, 0, 0);
+ _ = linux.prctl(@backingInt(linux.PR.SET_THP_DISABLE), 1, 0, 0, 0);
const arena = init.arena.allocator();
const args = try init.minimal.args.toSlice(arena);
@@ -390,7 +390,7 @@ test "ctl commands" {
const shared = shared_mem.get();
var a: App = .{ .info = .{}, .probe = probe, .shared = shared };
probe.thread_tid = .init(0);
- probe.serving = .initEmpty();
+ probe.serving = .empty;
probe.nested = 0;
var buf: [128]u8 = undefined;
var w: Writer = .fixed(&buf);