mirror of https://github.com/thesofproject/sof.git
schedule: fix schedule list double add
Check if the schedule task is added in the list before add it. Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
This commit is contained in:
parent
869c08d6c0
commit
85e1c0d738
|
@ -257,6 +257,13 @@ static int _schedule_task(struct task *task, uint64_t start, uint64_t deadline)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* is task already running ? - not enough MIPS to complete ? */
|
||||
if (task->state == TASK_STATE_QUEUED) {
|
||||
trace_pipe("tsq");
|
||||
spin_unlock_irq(&sch->lock, flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* get the current time */
|
||||
current = platform_timer_get(platform_timer);
|
||||
|
||||
|
|
Loading…
Reference in New Issue