ke/wait: add wait_reason

This commit is contained in:
Loïc Grégoire
2026-08-02 00:02:00 -04:00
parent 05c7694776
commit 24372a2b4e
12 changed files with 21 additions and 13 deletions
+3
View File
@@ -99,6 +99,8 @@ pub const Thread = struct {
/// Current wait status.
wait_status: std.atomic.Value(ki.wait.Status),
waitblocks: [4]ki.wait.WaitBlock,
/// Reason for the wait, if any.
wait_reason: ?[]const u8,
/// Timer used for timeouts.
timer: ke.Timer,
/// Turnstile.
@@ -146,6 +148,7 @@ pub const Thread = struct {
.runq_idx = 0,
.wait_status = .init(.Satisfied),
.waitblocks = undefined,
.wait_reason = null,
.timer = undefined,
.turnstile = undefined,
.turnstile_waiter = null,