From 8cf55162d0a2d7219fa9a9a02d04aa4ce8acffe6 Mon Sep 17 00:00:00 2001 From: wheremyfoodat Date: Wed, 12 Oct 2022 00:44:55 +0300 Subject: [PATCH] [Kernel] Fix yet another threading oopsie (BOOTS OCARINA OF TIME!!!!!) --- src/core/kernel/threads.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/kernel/threads.cpp b/src/core/kernel/threads.cpp index 7c4eea6d..70f58abe 100644 --- a/src/core/kernel/threads.cpp +++ b/src/core/kernel/threads.cpp @@ -150,6 +150,7 @@ void Kernel::sleepThread(s64 ns) { if (ns < 0) { Helpers::panic("Sleeping a thread for a negative amount of ns"); } else if (ns == 0) { // Used when we want to force a thread switch + threads[currentThreadIndex].status = ThreadStatus::Ready; switchToNextThread(); } else { // If we're sleeping for > 0 ns Thread& t = threads[currentThreadIndex];