From e7655e9725f0349bf932ec15a9862f0e6f70b8a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Gr=C3=A9goire?= Date: Sat, 19 Sep 2026 22:19:30 -0400 Subject: [PATCH] ke: fix scheduler deadlock on switching --- src/kern/sched.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kern/sched.zig b/src/kern/sched.zig index b851778..8764ded 100644 --- a/src/kern/sched.zig +++ b/src/kern/sched.zig @@ -1318,7 +1318,7 @@ pub fn yield_locked(continuation: ?ke.Continuation) void { break; } - while (next.?.switching.load(.monotonic) == true) { + while (cur != next and next.?.switching.load(.monotonic) == true) { std.atomic.spinLoopHint(); }