Skip to content

Commit 7aa5886

Browse files
keyonjielgirdwood
authored andcommitted
edf_schedule: don't assert if there is no extra task to run
There could be no more EDF task to be run if the last one in the list is finished, we don't need to assert in this case. If the next EDF task gonna be scheduled, interrupt will be generated again by calling to schedule_edf() in schedule_edf_task(), so it should be safe to remove the schedule_edf_task_running() in no pending task scenarios. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
1 parent 3ffeb87 commit 7aa5886

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/schedule/edf_schedule.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,9 @@ static void edf_scheduler_run(void *data)
9494

9595
irq_local_enable(flags);
9696

97-
/* having next task is mandatory */
98-
assert(task_next);
99-
100-
schedule_edf_task_running(data, task_next);
97+
/* schedule next pending task */
98+
if (task_next)
99+
schedule_edf_task_running(data, task_next);
101100
}
102101

103102
static int schedule_edf_task(void *data, struct task *task, uint64_t start,

0 commit comments

Comments
 (0)