diff --git a/kernel/task.c b/kernel/task.c index 7365873a..1304a1ee 100644 --- a/kernel/task.c +++ b/kernel/task.c @@ -883,7 +883,7 @@ int32_t mo_task_suspend(uint16_t id) } task->state = TASK_SUSPENDED; - bool is_current = (kcb->task_current == node); + bool is_current = (kcb->task_current->data == task); CRITICAL_LEAVE();