diff options
Diffstat (limited to 'include/litmus/locking.h')
-rw-r--r-- | include/litmus/locking.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/litmus/locking.h b/include/litmus/locking.h index 3ae6692dbe95..962ad5e6726a 100644 --- a/include/litmus/locking.h +++ b/include/litmus/locking.h | |||
@@ -229,5 +229,13 @@ struct litmus_lock_ops { | |||
229 | void suspend_for_lock(void); | 229 | void suspend_for_lock(void); |
230 | int wake_up_for_lock(struct task_struct* t); | 230 | int wake_up_for_lock(struct task_struct* t); |
231 | 231 | ||
232 | /* thread safe?? */ | ||
233 | #ifndef CONFIG_LITMUS_NESTED_LOCKING | ||
234 | #define holds_locks(tsk) \ | ||
235 | (tsk_rt(t)->num_locks_held || tsk_rt(t)->num_local_locks_held) | ||
236 | #else | ||
237 | #define holds_locks(tsk) \ | ||
238 | (tsk_rt(t)->num_locks_held || tsk_rt(t)->num_local_locks_held || !binheap_empty(&tsk_rt(t)->hp_blocked_tasks)) | ||
232 | #endif | 239 | #endif |
233 | 240 | ||
241 | #endif | ||