schedule: fix edf reschedule

Should reschedule if we did not try to reschedule.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
This commit is contained in:
Pan Xiuli 2018-09-06 13:54:14 +08:00
parent d527b50816
commit 869c08d6c0
1 changed files with 4 additions and 2 deletions

View File

@ -140,9 +140,11 @@ static inline struct task *edf_get_next(uint64_t current,
trace_pipe("ed!");
/* have we already tried to rescheule ? */
if (reschedule++)
if (!reschedule) {
reschedule++;
trace_pipe("edr");
edf_reschedule(task, current);
else {
} else {
/* reschedule failed */
list_item_del(&task->list);
task->state = TASK_STATE_CANCEL;