aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/sched_gsn_edf.c
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2012-04-06 17:21:55 -0400
committerJonathan Herman <hermanjl@cs.unc.edu>2012-04-06 17:21:55 -0400
commit451ed3b075c2a8e322e5a44f177e2470426a821d (patch)
tree862ce6f6e67b3c2f645a8483de4bae5e127f55ae /litmus/sched_gsn_edf.c
parentd47039bb8761a3ac95665a3d5745d1455d48b4d6 (diff)
Additional locking info
Diffstat (limited to 'litmus/sched_gsn_edf.c')
-rw-r--r--litmus/sched_gsn_edf.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/litmus/sched_gsn_edf.c b/litmus/sched_gsn_edf.c
index 3d32f74ff51c..0afd49155999 100644
--- a/litmus/sched_gsn_edf.c
+++ b/litmus/sched_gsn_edf.c
@@ -758,8 +758,11 @@ int gsnedf_fmlp_lock(struct litmus_lock* l)
758 /* check if we need to activate priority inheritance */ 758 /* check if we need to activate priority inheritance */
759 if (edf_higher_prio(t, sem->hp_waiter)) { 759 if (edf_higher_prio(t, sem->hp_waiter)) {
760 sem->hp_waiter = t; 760 sem->hp_waiter = t;
761 if (edf_higher_prio(t, sem->owner)) 761 if (edf_higher_prio(t, sem->owner)) {
762 sched_trace_priority_donate(sem->owner, t, l->id);
762 set_priority_inheritance(sem->owner, sem->hp_waiter); 763 set_priority_inheritance(sem->owner, sem->hp_waiter);
764
765 }
763 } 766 }
764 767
765 /* release lock before sleeping */ 768 /* release lock before sleeping */
@@ -789,6 +792,8 @@ int gsnedf_fmlp_lock(struct litmus_lock* l)
789 spin_unlock_irqrestore(&sem->wait.lock, flags); 792 spin_unlock_irqrestore(&sem->wait.lock, flags);
790 } 793 }
791 794
795 sched_trace_resource_acquire(t, l->id);
796
792 return 0; 797 return 0;
793} 798}
794 799
@@ -842,6 +847,8 @@ int gsnedf_fmlp_unlock(struct litmus_lock* l)
842 if (tsk_rt(t)->inh_task) 847 if (tsk_rt(t)->inh_task)
843 clear_priority_inheritance(t); 848 clear_priority_inheritance(t);
844 849
850 sched_trace_resource_release(t, l->id);
851
845out: 852out:
846 spin_unlock_irqrestore(&sem->wait.lock, flags); 853 spin_unlock_irqrestore(&sem->wait.lock, flags);
847 854