ke: detach from queue on thread exit

This commit is contained in:
Loïc Grégoire
2026-10-10 09:37:20 -04:00
parent 923e119756
commit ad7f14ecb8
+5
View File
@@ -285,6 +285,11 @@ pub fn exit() void {
curtd.lock.acquire_no_ipl(); curtd.lock.acquire_no_ipl();
curtd.state.store(.Zombie, .monotonic); curtd.state.store(.Zombie, .monotonic);
if (curtd.queue) |q| {
curtd.queue = null;
kep.queue.signal_wait(q);
}
if (config.warden) { if (config.warden) {
// There is normally a dispatch object -> thread ordering, but here we // There is normally a dispatch object -> thread ordering, but here we
// have a thread -> dispatch object ordering because we insert into a // have a thread -> dispatch object ordering because we insert into a