多任务处理 #1

Merged
patrick merged 4 commits from multitask into main 2026-05-31 19:29:39 +08:00
Showing only changes of commit 4ff227bc75 - Show all commits
+2 -1
View File
@@ -122,7 +122,8 @@ void yield(void) {
if (next == cur) return; // only one task, nothing to do 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; next->state = TASK_STATE_RUNNING;
g_current = next; g_current = next;