Commit 160bed5
committed
Add ready queue enqueue path in mo_task_wakeup()
Previously, mo_task_wakeup() only changed the task state to TASK_READY
without enqueuing the task back into the ready queue. As a result, a
woken-up task could remain invisible to the scheduler and never be
selected for execution.
This change adds a call to sched_enqueue_task() to insert the task into
the appropriate ready queue based on its priority level. The ready
bitmap, task counts of each ready queue, and RR cursor are updated
accordingly to maintain scheduler consistency.
With this update, tasks transitioned from a blocked or suspended state
can be properly scheduled for execution once they are woken up.1 parent e813dd9 commit 160bed5
1 file changed
+4
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
| 437 | + | |
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
443 | | - | |
| 443 | + | |
444 | 444 | | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
| 445 | + | |
| 446 | + | |
451 | 447 | | |
452 | 448 | | |
453 | 449 | | |
| |||
0 commit comments