aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/sched_gsn_edf.c
diff options
context:
space:
mode:
Diffstat (limited to 'litmus/sched_gsn_edf.c')
-rw-r--r--litmus/sched_gsn_edf.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/litmus/sched_gsn_edf.c b/litmus/sched_gsn_edf.c
index 990e4e1f86a9..b8548b885b35 100644
--- a/litmus/sched_gsn_edf.c
+++ b/litmus/sched_gsn_edf.c
@@ -577,25 +577,17 @@ static void gsnedf_task_wake_up(struct task_struct *task)
577 TRACE_TASK(task, "wake_up at %llu\n", litmus_clock()); 577 TRACE_TASK(task, "wake_up at %llu\n", litmus_clock());
578 578
579 raw_spin_lock_irqsave(&gsnedf_lock, flags); 579 raw_spin_lock_irqsave(&gsnedf_lock, flags);
580 /* We need to take suspensions because of semaphores into 580 now = litmus_clock();
581 * account! If a job resumes after being suspended due to acquiring 581 if (is_tardy(task, now)) {
582 * a semaphore, it should never be treated as a new job release. 582 /* new sporadic release */
583 */ 583 release_at(task, now);
584 if (get_rt_flags(task) == RT_F_EXIT_SEM) { 584 sched_trace_task_release(task);
585 tsk_rt(task)->completed = 0; 585 }
586 } else { 586 else {
587 now = litmus_clock(); 587 if (task->rt.time_slice) {
588 if (is_tardy(task, now)) { 588 /* came back in time before deadline
589 /* new sporadic release */ 589 */
590 release_at(task, now); 590 tsk_rt(task)->completed = 0;
591 sched_trace_task_release(task);
592 }
593 else {
594 if (task->rt.time_slice) {
595 /* came back in time before deadline
596 */
597 tsk_rt(task)->completed = 0;
598 }
599 } 591 }
600 } 592 }
601 gsnedf_job_arrival(task); 593 gsnedf_job_arrival(task);