Commit b7c2a64
committed
Refactor mo_task_spawn() for the new scheduler
This commit refactors mo_task_spawn() to align with the new O(1) scheduler
design. The task control block (tcb_t) embeds its list node during task
creation.
The enqueue operation is moved inside a critical section to guarantee
consistent enqueuing process during task creation.
The “first task assignment” logic is removed because first task has been
assigned to system idle task as previous commit mentioned.1 parent d95ce1b commit b7c2a64
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
899 | 899 | | |
900 | 900 | | |
901 | 901 | | |
902 | | - | |
903 | | - | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
904 | 907 | | |
905 | 908 | | |
906 | 909 | | |
| |||
920 | 923 | | |
921 | 924 | | |
922 | 925 | | |
923 | | - | |
924 | 926 | | |
925 | 927 | | |
926 | 928 | | |
| |||
0 commit comments