[fix] Scheduler overwrote task stats
This commit is contained in:
@@ -122,7 +122,8 @@ void yield(void) {
|
||||
|
||||
if (next == cur) return; // only one task, nothing to do
|
||||
|
||||
cur->state = TASK_STATE_READY;
|
||||
if (cur->state != TASK_STATE_TERMINATED)
|
||||
cur->state = TASK_STATE_READY;
|
||||
next->state = TASK_STATE_RUNNING;
|
||||
g_current = next;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user