Commit 72d3d91
committed
Refactor mo_task_spawn() for O(1) scheduler support
Previously, mo_task_spawn() only created a task and appended it to the
global task list (kcb->tasks), assigning the first task directly from
the global list node.
This change adds a call to sched_enqueue_task() within the critical
section to enqueue the task into the ready queue and safely initialize
its scheduling attributes. The first task assignment is now aligned
with the RR cursor mechanism to ensure consistency with the O(1)
scheduler.1 parent 2844df3 commit 72d3d91
1 file changed
+9
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
765 | 765 | | |
766 | 766 | | |
767 | 767 | | |
768 | | - | |
769 | | - | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
770 | 777 | | |
771 | 778 | | |
772 | 779 | | |
| |||
780 | 787 | | |
781 | 788 | | |
782 | 789 | | |
783 | | - | |
784 | 790 | | |
785 | 791 | | |
786 | 792 | | |
| |||
0 commit comments