diff --git a/kernel/tasks.c b/kernel/tasks.c index 32dc09ac..4a50ccb4 100644 --- a/kernel/tasks.c +++ b/kernel/tasks.c @@ -143,7 +143,7 @@ int join_kernel_task(tid_t id, void** result) * idle tasks are not allowed to wait for another task * they should always run... */ - if (BUILTIN_EXPECT(current_task->status, TASK_IDLE)) + if (BUILTIN_EXPECT(current_task->status == TASK_IDLE, 0)) goto join_out; /* a task is not able to wait for itself */