diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2011-02-05 22:57:57 -0500 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2011-02-05 22:57:57 -0500 |
commit | 26c9534ab5b19d9bbd092df8ff2439722c0b2758 (patch) | |
tree | e71acb53337e2ec809a73eb3c057197f5befddad /litmus | |
parent | 9ad6af9eaa75f5023b26b8a8c7b943088a83fd1b (diff) |
Feather-Trace: trace locking-related suspensions
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/sched_gsn_edf.c | 5 | ||||
-rw-r--r-- | litmus/sched_psn_edf.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/litmus/sched_gsn_edf.c b/litmus/sched_gsn_edf.c index c5c9600c33d8..bd3b36223428 100644 --- a/litmus/sched_gsn_edf.c +++ b/litmus/sched_gsn_edf.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <litmus/sched_plugin.h> | 18 | #include <litmus/sched_plugin.h> |
19 | #include <litmus/edf_common.h> | 19 | #include <litmus/edf_common.h> |
20 | #include <litmus/sched_trace.h> | 20 | #include <litmus/sched_trace.h> |
21 | #include <litmus/trace.h> | ||
21 | 22 | ||
22 | #include <litmus/preempt.h> | 23 | #include <litmus/preempt.h> |
23 | 24 | ||
@@ -762,6 +763,8 @@ int gsnedf_fmlp_lock(struct litmus_lock* l) | |||
762 | set_priority_inheritance(sem->owner, sem->hp_waiter); | 763 | set_priority_inheritance(sem->owner, sem->hp_waiter); |
763 | } | 764 | } |
764 | 765 | ||
766 | TS_LOCK_SUSPEND; | ||
767 | |||
765 | /* release lock before sleeping */ | 768 | /* release lock before sleeping */ |
766 | spin_unlock_irqrestore(&sem->wait.lock, flags); | 769 | spin_unlock_irqrestore(&sem->wait.lock, flags); |
767 | 770 | ||
@@ -772,6 +775,8 @@ int gsnedf_fmlp_lock(struct litmus_lock* l) | |||
772 | 775 | ||
773 | schedule(); | 776 | schedule(); |
774 | 777 | ||
778 | TS_LOCK_RESUME; | ||
779 | |||
775 | /* Since we hold the lock, no other task will change | 780 | /* Since we hold the lock, no other task will change |
776 | * ->owner. We can thus check it without acquiring the spin | 781 | * ->owner. We can thus check it without acquiring the spin |
777 | * lock. */ | 782 | * lock. */ |
diff --git a/litmus/sched_psn_edf.c b/litmus/sched_psn_edf.c index abb06fa53e3a..250c55a1e13d 100644 --- a/litmus/sched_psn_edf.c +++ b/litmus/sched_psn_edf.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <litmus/sched_plugin.h> | 20 | #include <litmus/sched_plugin.h> |
21 | #include <litmus/edf_common.h> | 21 | #include <litmus/edf_common.h> |
22 | #include <litmus/sched_trace.h> | 22 | #include <litmus/sched_trace.h> |
23 | #include <litmus/trace.h> | ||
23 | 24 | ||
24 | typedef struct { | 25 | typedef struct { |
25 | rt_domain_t domain; | 26 | rt_domain_t domain; |
@@ -428,6 +429,8 @@ int psnedf_fmlp_lock(struct litmus_lock* l) | |||
428 | 429 | ||
429 | __add_wait_queue_tail_exclusive(&sem->wait, &wait); | 430 | __add_wait_queue_tail_exclusive(&sem->wait, &wait); |
430 | 431 | ||
432 | TS_LOCK_SUSPEND; | ||
433 | |||
431 | /* release lock before sleeping */ | 434 | /* release lock before sleeping */ |
432 | spin_unlock_irqrestore(&sem->wait.lock, flags); | 435 | spin_unlock_irqrestore(&sem->wait.lock, flags); |
433 | 436 | ||
@@ -438,6 +441,8 @@ int psnedf_fmlp_lock(struct litmus_lock* l) | |||
438 | 441 | ||
439 | schedule(); | 442 | schedule(); |
440 | 443 | ||
444 | TS_LOCK_RESUME; | ||
445 | |||
441 | /* Since we hold the lock, no other task will change | 446 | /* Since we hold the lock, no other task will change |
442 | * ->owner. We can thus check it without acquiring the spin | 447 | * ->owner. We can thus check it without acquiring the spin |
443 | * lock. */ | 448 | * lock. */ |