diff options
-rw-r--r-- | litmus/sched_gsn_edf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/litmus/sched_gsn_edf.c b/litmus/sched_gsn_edf.c index 04454e8ce51e..27a89eeb11ac 100644 --- a/litmus/sched_gsn_edf.c +++ b/litmus/sched_gsn_edf.c | |||
@@ -531,7 +531,7 @@ static void gsnedf_finish_switch(struct task_struct *prev) | |||
531 | 531 | ||
532 | /* Prepare a task for running in RT mode | 532 | /* Prepare a task for running in RT mode |
533 | */ | 533 | */ |
534 | static void gsnedf_task_new(struct task_struct * t, int on_rq, int running) | 534 | static void gsnedf_task_new(struct task_struct * t, int on_rq, int is_scheduled) |
535 | { | 535 | { |
536 | unsigned long flags; | 536 | unsigned long flags; |
537 | cpu_entry_t* entry; | 537 | cpu_entry_t* entry; |
@@ -543,7 +543,7 @@ static void gsnedf_task_new(struct task_struct * t, int on_rq, int running) | |||
543 | /* setup job params */ | 543 | /* setup job params */ |
544 | release_at(t, litmus_clock()); | 544 | release_at(t, litmus_clock()); |
545 | 545 | ||
546 | if (running) { | 546 | if (is_scheduled) { |
547 | entry = &per_cpu(gsnedf_cpu_entries, task_cpu(t)); | 547 | entry = &per_cpu(gsnedf_cpu_entries, task_cpu(t)); |
548 | BUG_ON(entry->scheduled); | 548 | BUG_ON(entry->scheduled); |
549 | 549 | ||
@@ -564,7 +564,8 @@ static void gsnedf_task_new(struct task_struct * t, int on_rq, int running) | |||
564 | } | 564 | } |
565 | t->rt_param.linked_on = NO_CPU; | 565 | t->rt_param.linked_on = NO_CPU; |
566 | 566 | ||
567 | gsnedf_job_arrival(t); | 567 | if (is_running(t)) |
568 | gsnedf_job_arrival(t); | ||
568 | raw_spin_unlock_irqrestore(&gsnedf_lock, flags); | 569 | raw_spin_unlock_irqrestore(&gsnedf_lock, flags); |
569 | } | 570 | } |
570 | 571 | ||