diff options
Diffstat (limited to 'litmus/sched_cedf.c')
-rw-r--r-- | litmus/sched_cedf.c | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/litmus/sched_cedf.c b/litmus/sched_cedf.c index 62d28d2bf1c8..b45b46fc4fca 100644 --- a/litmus/sched_cedf.c +++ b/litmus/sched_cedf.c | |||
@@ -595,25 +595,17 @@ static void cedf_task_wake_up(struct task_struct *task) | |||
595 | cluster = task_cpu_cluster(task); | 595 | cluster = task_cpu_cluster(task); |
596 | 596 | ||
597 | raw_spin_lock_irqsave(&cluster->cluster_lock, flags); | 597 | raw_spin_lock_irqsave(&cluster->cluster_lock, flags); |
598 | /* We need to take suspensions because of semaphores into | 598 | now = litmus_clock(); |
599 | * account! If a job resumes after being suspended due to acquiring | 599 | if (is_tardy(task, now)) { |
600 | * a semaphore, it should never be treated as a new job release. | 600 | /* new sporadic release */ |
601 | */ | 601 | release_at(task, now); |
602 | if (get_rt_flags(task) == RT_F_EXIT_SEM) { | 602 | sched_trace_task_release(task); |
603 | tsk_rt(task)->completed = 0; | 603 | } |
604 | } else { | 604 | else { |
605 | now = litmus_clock(); | 605 | if (task->rt.time_slice) { |
606 | if (is_tardy(task, now)) { | 606 | /* came back in time before deadline |
607 | /* new sporadic release */ | 607 | */ |
608 | release_at(task, now); | 608 | tsk_rt(task)->completed = 0; |
609 | sched_trace_task_release(task); | ||
610 | } | ||
611 | else { | ||
612 | if (task->rt.time_slice) { | ||
613 | /* came back in time before deadline | ||
614 | */ | ||
615 | tsk_rt(task)->completed = 0; | ||
616 | } | ||
617 | } | 609 | } |
618 | } | 610 | } |
619 | cedf_job_arrival(task); | 611 | cedf_job_arrival(task); |