Skip to content

Commit 295a0d9

Browse files
authored
Merge pull request #55 from vicLin8712/fix-current-task-check
Refine current-task check in mo_task_suspend()
2 parents 3d94a32 + bf76c93 commit 295a0d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/task.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ int32_t mo_task_suspend(uint16_t id)
883883
}
884884

885885
task->state = TASK_SUSPENDED;
886-
bool is_current = (kcb->task_current == node);
886+
bool is_current = (kcb->task_current->data == task);
887887

888888
CRITICAL_LEAVE();
889889

0 commit comments

Comments
 (0)