summaryrefslogtreecommitdiff
path: root/core/Kind.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-20 00:03:29 -0300
committerGabriel Schneider <[email protected]>2026-11-20 00:03:29 -0300
commit3a3601f984d25f1e03cee3ac47da7eeb2548e511 (patch)
tree445331cb8ad346989c4e4f6a3ceff54411064e4a /core/Kind.zig
parent8a1f65a2d374796b9b5559c4aab87c8d1e8f6e68 (diff)
parent528530ed065b2059d16b08efd92103d1dbbccc31 (diff)
downloadpardes-3a3601f984d25f1e03cee3ac47da7eeb2548e511.tar.gz
pardes-3a3601f984d25f1e03cee3ac47da7eeb2548e511.zip
integration: a far client's seven small faults on the renamed tree: pardes-far-faults (a refocus that no longer asks the session's host about a newer build; a drag in a kind's pane grown too short; a draw's token that no rollback takes back; a text's declarations dumped so a joined client's query reads what the session's does; a search that goes on at once on a far client; two tests of what cannot happen) and pardes-merge24, merged without a textual conflict; the coordinator's gate in the ledger (reorg/merge25)
Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/Kind.zig')
-rw-r--r--core/Kind.zig17
1 files changed, 9 insertions, 8 deletions
diff --git a/core/Kind.zig b/core/Kind.zig
index 7641c2d1..81997afb 100644
--- a/core/Kind.zig
+++ b/core/Kind.zig
@@ -136,7 +136,7 @@ pub const Slot = struct {
// jobs' inputs, its file's hash, a placeholder's record), and what
// a frame makes (the thumb, the pointer, whether one was drawn: a
// view's, never a step's).
- .local = .{ "ops", "st", "gpa", "arena", "plain", "file", "opened", "reloads", "jobs", "record", "thumb_at", "thumb_span", "pointer", "painted", "over", "used", "draws" },
+ .local = .{ "ops", "st", "gpa", "arena", "plain", "file", "opened", "reloads", "jobs", "record", "thumb_at", "thumb_span", "pointer", "painted", "over", "used" },
};
/// Its kind's code here; null in a placeholder (`live` false: its kind
/// not in the registry, its record kept for the day it comes) or a
@@ -198,11 +198,6 @@ pub const Slot = struct {
/// whether a frame was painted since its last tick.
pointer: u8 = 0,
painted: bool = false,
- /// The last of its draws' tokens (api.draw), each its own process's: a
- /// draw is a frame's, and how many frames each process paints differs,
- /// so it is in no digest; the copy holds it with the slot. A kind
- /// keeping one in its state (PA_PLAIN) is caught at that call's digest.
- draws: u32 = 0,
/// Each view's facts (a hash of its pa_view) as `view` was last told
/// them, 0 for none: a change tells it again.
views: [views.max]u64 = @splat(0),
@@ -1220,8 +1215,8 @@ pub const api: c.pa_api = .{
heap.free(copy);
return 0;
};
- cl.slot.draws = (cl.slot.draws +% 1) & ~c.PA_DRAWN;
- const token = c.PA_DRAWN | cl.slot.draws;
+ drawn = (drawn +% 1) & ~c.PA_DRAWN;
+ const token = c.PA_DRAWN | drawn;
j.* = .{ .gpa = heap, .pane = @intCast(cl.id), .serial = pane.serial, .token = token, .gen = cl.slot.gen, .ops = ops, .in = copy, .arena = .init(heap), .draw = p };
Addon.holdJob(ops, true);
if (drawer) |d| if (d.go(d.ctx, j)) return token;
@@ -1250,6 +1245,12 @@ pub const api: c.pa_api = .{
pub var drawer: ?struct { ctx: ?*anyopaque, go: *const fn (ctx: ?*anyopaque, j: *host_io.KindJob) bool } = null;
/// Draws done, each kept for its pane's next paint (the loop's alone).
var ready: std.ArrayListUnmanaged(*host_io.KindJob) = .empty;
+/// The last token a draw was given: a draw is a frame's, this process's, in
+/// no digest and no copy (a kind keeping one in its PA_PLAIN state is
+/// caught at that call's digest). A rollback takes a slot back, never this,
+/// so no draw is given the token a discarded speculation's frame was, whose
+/// answer may come after.
+var drawn: u32 = 0;
/// A draw done on a worker, back on the loop: kept for its pane's next
/// paint, a frame owed. One of another core's (a client joined again