From 4098a96b708deb116c31fc0a893d35ef1ce6918f Mon Sep 17 00:00:00 2001 From: Baptiste Wicht Date: Sun, 21 Aug 2016 11:48:52 +0200 Subject: [PATCH] Fix sleep queue --- kernel/include/sleep_queue.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/include/sleep_queue.hpp b/kernel/include/sleep_queue.hpp index b15d78e2..742e55b0 100644 --- a/kernel/include/sleep_queue.hpp +++ b/kernel/include/sleep_queue.hpp @@ -63,8 +63,10 @@ public: if(pid != scheduler::INVALID_PID){ logging::logf(logging::log_level::TRACE, "sleep_queue: wake %d\n", pid); - //Indicate to the scheduler that this process will be able to run - scheduler::unblock_process(pid); + // Indicate to the scheduler that this process will be able to run + // We use a hint here because it is possible that the thread was + // already woken up from sleep + scheduler::unblock_process_hint(pid); return pid; }