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 committed Nov 21, 2023
1 parent 980b988 commit 18ba7a3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/schedule/zephyr_ll.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@ 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 with largest priority value
* first, followed by smaller values. The list is used to run
* the tasks in priority order, with priority 0 being the
* highest and always run first. Tasks with the same
* priority are served on a first-come-first-serve basis.
*/
list_for_item(list, &sch->tasks) {
task_iter = container_of(list, struct task, list);
Expand Down

0 comments on commit 18ba7a3

Please sign in to comment.