aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--litmus/sched_gsn_edf.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/litmus/sched_gsn_edf.c b/litmus/sched_gsn_edf.c
index 37f7821dca50..37294111bb0c 100644
--- a/litmus/sched_gsn_edf.c
+++ b/litmus/sched_gsn_edf.c
@@ -723,15 +723,16 @@ static void gsnedf_change_prio_pai_tasklet(struct task_struct *old_prio,
723 struct tasklet_struct* step; 723 struct tasklet_struct* step;
724 unsigned long flags; 724 unsigned long flags;
725 725
726 raw_spin_lock_irqsave(&gsnedf_lock, flags); 726 if(gsnedf_pending_tasklets.head != NULL) {
727 727 raw_spin_lock_irqsave(&gsnedf_lock, flags);
728 for(step = gsnedf_pending_tasklets.head; step != NULL; step = step->next) { 728 for(step = gsnedf_pending_tasklets.head; step != NULL; step = step->next) {
729 if(step->owner == old_prio) { 729 if(step->owner == old_prio) {
730 TRACE("%s: Found tasklet to flush: %d\n", __FUNCTION__, step->owner->pid); 730 TRACE("%s: Found tasklet to change: %d\n", __FUNCTION__, step->owner->pid);
731 step->owner = new_prio; 731 step->owner = new_prio;
732 }
732 } 733 }
734 raw_spin_unlock_irqrestore(&gsnedf_lock, flags);
733 } 735 }
734 raw_spin_unlock_irqrestore(&gsnedf_lock, flags);
735} 736}
736 737
737#endif // end PAI 738#endif // end PAI