From 4599e1dec555cbd4db98e7e9fe269598c9532d63 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 1 Aug 2024 17:19:30 +0300 Subject: [PATCH] Kernel: Make schedler not crash when unblocking active thread This was happening when sending signals to processes that were currently running. --- kernel/kernel/Scheduler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/kernel/Scheduler.cpp b/kernel/kernel/Scheduler.cpp index 86aaaf43..197d93ad 100644 --- a/kernel/kernel/Scheduler.cpp +++ b/kernel/kernel/Scheduler.cpp @@ -328,7 +328,8 @@ namespace Kernel if (node->processor_id == Processor::current_id()) { - ASSERT(node->blocked); + if (!node->blocked) + return; m_block_queue.remove_node(node); if (node->blocker) node->blocker->remove_blocked_thread(node);