Commit a7c43ea
committed
Add enqueue path to sched_enqueue_task()
Previously, `sched_enqueue_task()` only marked task state as TASK_READY
to represent the task has been enqueued due to the original scheduler
selects the next task based on the global list and all tasks are kept in
it.
After new data structure, ready_queue[], is added for keeping runnable
tasks, the enqueuing task API should push the embedded linkage list node,
rq_node, into the corresponding ready_queue.
This commit uses list_pushback_node() helper to enqueue the embeded list
node of tcb into ready queue and sets up cursor and bitmap of the
corresponding priority queue.1 parent f03d150 commit a7c43ea
1 file changed
+23
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
| 360 | + | |
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| 366 | + | |
| 367 | + | |
366 | 368 | | |
367 | | - | |
| 369 | + | |
368 | 370 | | |
369 | 371 | | |
370 | | - | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
371 | 390 | | |
372 | 391 | | |
373 | 392 | | |
| |||
0 commit comments