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-11-24 14:15:06 -0500 |
commit | 4490f9ecf94e28458069a02e8cfcf4f385390499 (patch) | |
tree | 04e8166b5f0fdf53614db0977b8d56f727007390 /litmus | |
parent | b739b4033c0f55f9194be2793db9e6ace06047db (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 7aad7f0ad8f2..6ed504f4750e 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 | ||
@@ -799,6 +800,8 @@ int gsnedf_fmlp_lock(struct litmus_lock* l) | |||
799 | set_priority_inheritance(sem->owner, sem->hp_waiter); | 800 | set_priority_inheritance(sem->owner, sem->hp_waiter); |
800 | } | 801 | } |
801 | 802 | ||
803 | TS_LOCK_SUSPEND; | ||
804 | |||
802 | /* release lock before sleeping */ | 805 | /* release lock before sleeping */ |
803 | spin_unlock_irqrestore(&sem->wait.lock, flags); | 806 | spin_unlock_irqrestore(&sem->wait.lock, flags); |
804 | 807 | ||
@@ -809,6 +812,8 @@ int gsnedf_fmlp_lock(struct litmus_lock* l) | |||
809 | 812 | ||
810 | schedule(); | 813 | schedule(); |
811 | 814 | ||
815 | TS_LOCK_RESUME; | ||
816 | |||
812 | /* Since we hold the lock, no other task will change | 817 | /* Since we hold the lock, no other task will change |
813 | * ->owner. We can thus check it without acquiring the spin | 818 | * ->owner. We can thus check it without acquiring the spin |
814 | * lock. */ | 819 | * lock. */ |
diff --git a/litmus/sched_psn_edf.c b/litmus/sched_psn_edf.c index eb444ecf1288..8e4a22dd8d6a 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; |
@@ -422,6 +423,8 @@ int psnedf_fmlp_lock(struct litmus_lock* l) | |||
422 | 423 | ||
423 | __add_wait_queue_tail_exclusive(&sem->wait, &wait); | 424 | __add_wait_queue_tail_exclusive(&sem->wait, &wait); |
424 | 425 | ||
426 | TS_LOCK_SUSPEND; | ||
427 | |||
425 | /* release lock before sleeping */ | 428 | /* release lock before sleeping */ |
426 | spin_unlock_irqrestore(&sem->wait.lock, flags); | 429 | spin_unlock_irqrestore(&sem->wait.lock, flags); |
427 | 430 | ||
@@ -432,6 +435,8 @@ int psnedf_fmlp_lock(struct litmus_lock* l) | |||
432 | 435 | ||
433 | schedule(); | 436 | schedule(); |
434 | 437 | ||
438 | TS_LOCK_RESUME; | ||
439 | |||
435 | /* Since we hold the lock, no other task will change | 440 | /* Since we hold the lock, no other task will change |
436 | * ->owner. We can thus check it without acquiring the spin | 441 | * ->owner. We can thus check it without acquiring the spin |
437 | * lock. */ | 442 | * lock. */ |