diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-27 20:25:26 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | 5d9a56d47a9cd5eefc4c8bf03709f2e96febb212 (patch) | |
| tree | 3471e580d122efbaa881b338ad3542d864c65f65 /src/ninep/pane.zig | |
| parent | 7dc3891ed574d6e96548f592b09b0f8abc87ae2a (diff) | |
| download | pardes-5d9a56d47a9cd5eefc4c8bf03709f2e96febb212.tar.gz pardes-5d9a56d47a9cd5eefc4c8bf03709f2e96febb212.zip | |
A pane's ctl takes acme's lock and unlock
A client doing an edit of several writes to addr and data had no way to
keep another client's from landing in between. acme's window ctl takes
lock and unlock for this (editors/acme/xfid.c:603-611): a qlock that
blocks a second locker, owned by the fid that wrote it and given up when
that fid is clunked, binding only clients that ask. pardes does the same:
the open's record holds it, a second lock parks until unlock, close or
the pane closing, and no other write is refused for it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/pane.zig')
| -rw-r--r-- | src/ninep/pane.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ninep/pane.zig b/src/ninep/pane.zig index c03cd776..3d7834c4 100644 --- a/src/ninep/pane.zig +++ b/src/ninep/pane.zig @@ -46,6 +46,8 @@ pub const State = struct { /// The open record (tree.zig) of the pty/run waiting on this shell's /// current command. run: ?u8 = null, + /// The open record of the ctl open that wrote `lock` (ctl.zig). + lock: ?u8 = null, /// The host started a shell it could not teach to mark its prompts. unmarked: bool = false, /// Installed during this update; /log hears about it once the update ends |
