summaryrefslogtreecommitdiff
path: root/src/9p_io.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-23 10:56:33 -0300
committerGabriel Schneider <[email protected]>2026-10-23 17:10:58 -0300
commita0d367b6c54ff29737662fd7cf5a78d4d183cb20 (patch)
tree295dfa438f54b72a907d2c847784d5b5982fca9e /src/9p_io.zig
parent7b743fcc7d568f13512a59089c5214bb6fa3282f (diff)
downloadpardes-a0d367b6c54ff29737662fd7cf5a78d4d183cb20.tar.gz
pardes-a0d367b6c54ff29737662fd7cf5a78d4d183cb20.zip
Audit (core, modal): goto/insert/select tables, edit through sam.Op and sam.apply, Turn.bump and awaitPast, dead helpers out
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/9p_io.zig')
-rw-r--r--src/9p_io.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/9p_io.zig b/src/9p_io.zig
index 87972b43..a825475f 100644
--- a/src/9p_io.zig
+++ b/src/9p_io.zig
@@ -343,7 +343,7 @@ pub const Listener = struct {
@memcpy(words, reply.ename[0..words.len]);
var waited = reply;
waited.ename = words;
- pardes.turn.awaitSettled(epoch);
+ pardes.turn.awaitPast(&pardes.turn.epoch, epoch);
return conn.reply(&waited, "");
}
// Any other refusal answers at once, for the same buffer's sake.
@@ -371,11 +371,11 @@ pub const Listener = struct {
core.fs.late_failure_len = 0;
// What fails while this waits is this write's err, never a msg too.
core.fs.write_waits = true;
- if (core.effects_len != 0) pardes.turn.awaitSettled(epoch);
+ if (core.effects_len != 0) pardes.turn.awaitPast(&pardes.turn.epoch, epoch);
if (core.fs.lsp_answer_at) |n| {
core.fs.lsp_answer_at = null;
core.fs.lsp_result = null;
- pardes.turn.awaitLsp(n);
+ pardes.turn.awaitPast(&pardes.turn.lsp_answers, n);
// The answer filled a pane (a Rename's preview): that is what
// this write's open reads back, as look and exec answer.
if (l.core == core) if (core.fs.lsp_result) |serial| {
@@ -410,7 +410,7 @@ pub const Listener = struct {
// hears that it happened rather than a cut; a failed one leaves the
// connection and says why on the message row and in the log.
if (restoring) {
- if (l.core == core) pardes.turn.awaitRestored(restores);
+ if (l.core == core) pardes.turn.awaitPast(&pardes.turn.restores, restores);
return conn.reply(&reply, "");
}
// Once a wait returns `core` may be gone: a Restore meanwhile put a
@@ -695,8 +695,8 @@ pub const Listener = struct {
// fids it names are the old editor's. A client that connects now
// is the replacement's, and stays.
l.cut_before = l.accepts.load(.acquire);
- pardes.turn.settle();
- pardes.turn.restoreSettled();
+ pardes.turn.bump(&pardes.turn.epoch);
+ pardes.turn.bump(&pardes.turn.restores);
pardes.turn.rest();
const flush_by = nowMs() +| 200;
while (nowMs() < flush_by) {