diff options
| author | Gabriel Schneider <[email protected]> | 2026-08-27 15:28:21 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-27 15:32:02 -0300 |
| commit | 0a21ea831d6791b406eef70b3e95cfd319d8ed36 (patch) | |
| tree | cd92d6c745ac6aa19e8933f5bee17db6854b6dab /src/tty | |
| parent | e9897bd9566832dfa09f4d3cf5daa6f3d0a84bd5 (diff) | |
| download | pardes-0a21ea831d6791b406eef70b3e95cfd319d8ed36.tar.gz pardes-0a21ea831d6791b406eef70b3e95cfd319d8ed36.zip | |
fs_service: the transport is a ctx and three functions, not a *fuse.Fs
Step 2 of the 9P chain (docs/9p.typ 12.2, docs/registry.typ 9P-2).
`drain` and `step` never asked a `*fuse.Fs` for anything but `retry()`,
`next()` and `reply()`, so the concrete pointer was a coupling that bought
nothing and forbade a second answer. `Transport` names the three; `Fs.transport()`
is the first implementor and the thunks are the entire cost.
No behaviour change. The order contract -- retry() to null, then next() to null --
moves into `drain`'s doc comment, where it belongs: it is the caller's rule and
every implementor inherits it, rather than a fact about FUSE.
`start` and `wake` keep their `*fuse.Fs`: they are about a MOUNT, which is a
FUSE thing, and a 9P listener will bring its own.
Measured unchanged against zig build fs-bench -Doptimize=ReleaseFast: getattr 19 ns,
lookup 40, read body 4K/1M 25/25, read ctl 385, read index 633, readdir 38,
read event (empty) 22, all at zero allocations.
Diffstat (limited to 'src/tty')
| -rw-r--r-- | src/tty/tty.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tty/tty.zig b/src/tty/tty.zig index d7de3ae2..5eb9a277 100644 --- a/src/tty/tty.zig +++ b/src/tty/tty.zig @@ -1213,7 +1213,7 @@ const Shell = struct { // reload is (see reloadWatched): one batch per frame, not one frame per // request. First in the pass, so an edit a script just made through // `body` is in the surface this frame composes rather than the next. - if (s.fs) |f| if (fs_service.drain(f, s.core).pending) { + if (s.fs) |f| if (fs_service.drain(f.transport(), s.core).pending) { // The batch hit its cap with requests still pending, and no ack has // gone to the poll thread — so nothing else will wake us. Re-arm // the loop ourselves. tryPostEvent, not postEvent: this runs on the |
