From fd50bd971d6dea7eaaa4ee5436ba16b95fa25b30 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 20 Sep 2026 02:34:12 -0300 Subject: Serve Unix and TCP 9P through cloud9.serve's std.Io runner The hand-written poll loop for Unix/TCP listeners is replaced by cloud9.serve.Runner; requests are queued to the editor thread, which answers them under the connection lock on each frame and retries parked reads as before. QUIC keeps the poll path (its adapter is fd based). The detached server no longer loses a wake that lands between frames. The firmware path keeps driving the engine with push/step. cloud9 re-pinned. Co-Authored-By: Claude Fable 5.1 --- src/macos.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/macos.zig') diff --git a/src/macos.zig b/src/macos.zig index d0d379de..79036c3e 100644 --- a/src/macos.zig +++ b/src/macos.zig @@ -745,7 +745,7 @@ fn initCore(runtime: ?*const Runtime, cols_arg: u16, rows_arg: u16) !void { .runtime = if (runtime) |r| r.* else .{}, }; const st = &state.?; - st.ninep = ninep_io.start(gpa, core); + st.ninep = ninep_io.start(io, gpa, core); core.host = hostFor(st); const cols = @max(1, cols_arg); @@ -754,7 +754,7 @@ fn initCore(runtime: ?*const Runtime, cols_arg: u16, rows_arg: u16) !void { while (core.nextEffect()) |effect| core.perform(effect); st.started = true; - if (st.ninep) |listener| listener.wakeThread(st, wakeNinep) catch |err| core.reportError(0, "9p wake", err); + if (st.ninep) |listener| listener.watch(st, wakeNinep) catch |err| core.reportError(0, "9p wake", err); for (&st.ptys, 0..) |*slot, id| if (slot.*) |*pt| startReader(st, pt, @intCast(id)); pardes.lsp.setStatusSink(st, lspStatusSink); -- cgit v1.3