Skip to content

Commit

Permalink
schedule: zephyr_ll: update zephyr_ll_task_insert_unlocked comments
Browse files Browse the repository at this point in the history
Clarify the inline comment in zephyr_ll_task_insert_unlocked()
explaining the task priority semantics. The old text is not clear on
what is "high priority". Make it explicit that 0 is the highest priority
and that the tasks are executed in order of task priority.

Signed-off-by: Kai Vehmanen <[email protected]>
  • Loading branch information
kv2019i authored and dbaluta committed Nov 22, 2023
1 parent 2c8b76a commit ee80da7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/schedule/zephyr_ll.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ static void zephyr_ll_task_insert_unlocked(struct zephyr_ll *sch, struct task *t
task->state = SOF_TASK_STATE_QUEUED;

/*
* Tasks are added into the list from highest to lowest priority. This
* way they can then be run in the same order. Tasks with the same
* priority are served on a first-come-first-serve basis
* Tasks are added into the list in priority order. List order
* defines schedule order. Priority 0 indicates highest
* priority and is run first. Tasks with the same priority are
* served on a first-come-first-served basis.
*/
list_for_item(list, &sch->tasks) {
task_iter = container_of(list, struct task, list);
Expand Down

0 comments on commit ee80da7

Please sign in to comment.