Commit 75b4eeb
committed
Refactor sched_enqueue_task() for O(1) scheduler support
Previously, sched_enqueue_task() only changed task state without inserting
into ready queue. As a result, the scheduler could not select enqueued task
for execution.
This change pushes the task into the appropriate ready queue using
list_pusback(), and initializes realated attribution such as the
ready bitmap and RR cursor. The ready queue for corresponging task
priority will be initialized at this enqueue path and never be
released afterward.
With this updated API, tasks can be enqueued into the ready queue and
selected by cursor-based O(1) scheduler.1 parent 6bd43f1 commit 75b4eeb
1 file changed
+28
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | | - | |
| 352 | + | |
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
| 358 | + | |
| 359 | + | |
358 | 360 | | |
359 | | - | |
| 361 | + | |
360 | 362 | | |
361 | 363 | | |
362 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
363 | 387 | | |
364 | 388 | | |
365 | 389 | | |
| |||
0 commit comments