Commit f673a71
committed
Add idle task per hart at boot to prevent panic on no runnable tasks
To prevent kernel panic during startup when some harts may not have any
runnable tasks assigned, add an idle task for each hart. The idle task
runs an infinite loop calling mo_task_wfi(), ensuring the hart remains
in a low-power wait state instead of causing a panic due to lack of
tasks.
This guarantees that every hart has at least one task to execute
immediately after boot, improving system robustness and stability on
SMP setups.1 parent f23c962 commit f673a71
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
8 | 14 | | |
9 | 15 | | |
10 | 16 | | |
| |||
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
| 56 | + | |
| 57 | + | |
50 | 58 | | |
51 | 59 | | |
52 | 60 | | |
| |||
0 commit comments