[fix] Scheduler overwrote task stats

This commit is contained in:
2026-05-31 18:13:16 +08:00
Unverified
parent b8212e2127
commit 4ff227bc75
+2 -1
View File
@@ -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;