diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2013-04-06 13:56:22 -0400 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2013-04-06 13:56:22 -0400 |
commit | 92d266b64e0def8554ebece70318a5ae0050573a (patch) | |
tree | a10f170121b45172df816a8d662024754cbbee5f /litmus/locking.c | |
parent | 886c672274a1807d108d995438937e1ee1c4fe89 (diff) |
Implement OMLP-Family budget exhaustion hooks.
Diffstat (limited to 'litmus/locking.c')
-rw-r--r-- | litmus/locking.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/litmus/locking.c b/litmus/locking.c index d347fdce4cb7..88905d4cff26 100644 --- a/litmus/locking.c +++ b/litmus/locking.c | |||
@@ -125,6 +125,11 @@ asmlinkage long sys_litmus_lock(int lock_od) | |||
125 | sched_trace_lock(current, l->ident, 1); | 125 | sched_trace_lock(current, l->ident, 1); |
126 | 126 | ||
127 | TRACE_CUR("Got lock %d\n", l->ident); | 127 | TRACE_CUR("Got lock %d\n", l->ident); |
128 | |||
129 | if (tsk_rt(current)->outermost_lock == NULL) { | ||
130 | TRACE_CUR("Lock %d is outermost lock.\n", l->ident); | ||
131 | tsk_rt(current)->outermost_lock = l; | ||
132 | } | ||
128 | } | 133 | } |
129 | } | 134 | } |
130 | 135 | ||
@@ -158,6 +163,12 @@ asmlinkage long sys_litmus_unlock(int lock_od) | |||
158 | sched_trace_lock(current, l->ident, 0); | 163 | sched_trace_lock(current, l->ident, 0); |
159 | 164 | ||
160 | TRACE_CUR("Unlocked %d\n", l->ident); | 165 | TRACE_CUR("Unlocked %d\n", l->ident); |
166 | |||
167 | if (tsk_rt(current)->outermost_lock == l) { | ||
168 | TRACE_CUR("Lock %d assumed to be outermost lock.\n", l->ident); | ||
169 | tsk_rt(current)->outermost_lock = NULL; | ||
170 | WARN_ON(holds_locks(current)); | ||
171 | } | ||
161 | } | 172 | } |
162 | } | 173 | } |
163 | 174 | ||