summaryrefslogtreecommitdiff
path: root/src/ninep/tree.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/ninep/tree.zig')
-rw-r--r--src/ninep/tree.zig16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ninep/tree.zig b/src/ninep/tree.zig
index 5a0c1e11..b13b1472 100644
--- a/src/ninep/tree.zig
+++ b/src/ninep/tree.zig
@@ -68,6 +68,22 @@ pub const e_bad_event = "bad event syntax";
/// everywhere, as it is in acme (editors/acme/fsys.c, fsyscreate).
pub const features: cloud9.fs.Features = .{ .remove = true };
+/// Whether a request must wait until no step is out in a syscall
+/// (`pardes.turn`): what would change a pane such a step still points into.
+/// Making a pane and rendering a screen do not -- every yield sits before
+/// the mutation of its own step, so the layout and the surface are whole
+/// under it -- and a step out there is never waiting on a write of its own,
+/// so what parks here is never the syscall's own request.
+pub fn needsQuiet(req: Req) bool {
+ return switch (req.op) {
+ .write, .setattr => true,
+ .release => req.remove,
+ else => false,
+ };
+}
+
+/// `needsQuiet`, plus the open that makes a pane: what costs a frame and a
+/// wake of the editor.
pub fn changesPane(req: Req) bool {
return switch (req.op) {
.write, .setattr => true,