summaryrefslogtreecommitdiff
path: root/9proc/demo/main.zig
diff options
context:
space:
mode:
Diffstat (limited to '9proc/demo/main.zig')
-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);