BarryServer : Git

All the code for all my projects
// BarryServer : Git / Nucleus / commit / 6063f6693644654ed3fe8ed5c6ca6be311696132 / task / exit.c

// Related

Nucleus

Barry Fixed scheduler double-schedule bug 6063f66 (3 years, 2 months ago)
diff --git a/task/exit.c b/task/exit.c
index 52547b9..4069775 100644
--- a/task/exit.c
+++ b/task/exit.c
@@ -4,11 +4,9 @@
  * tasks and the parent.
  */
 
-#include <nucleus/panic.h>
+#include <nucleus/kernel.h>
 #include <nucleus/task.h>
 
-extern ObjectList *readyQueue[];
-
 /* Terminate the current task */
 _Noreturn void
 terminate(void)
@@ -20,7 +18,7 @@ terminate(void)
 	Task *tmp;
 	while (current->wait && count(current->wait)) {
 		tmp = pop_from_start(current->wait);
-		add(readyQueue[tmp->priority], tmp);
+		unblock_task(tmp);
 		put(tmp);
 	}