Commit 8bce4b8
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 abbcbe9 commit 8bce4b8
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
750 | | - | |
751 | | - | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
752 | 755 | | |
753 | 756 | | |
754 | 757 | | |
| |||
762 | 765 | | |
763 | 766 | | |
764 | 767 | | |
765 | | - | |
766 | 768 | | |
767 | 769 | | |
768 | 770 | | |
| |||
0 commit comments