aboutsummaryrefslogtreecommitdiff
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-07-20 19:16:29 +0200
committerIngo Molnar <mingo@elte.hu>2009-08-02 15:41:34 +0200
commitf607c6685774811b8112e124f10a053d77015485 (patch)
tree4d32d967c8f8fb37ae09319735062a131a91725b /kernel/sched.c
parent98c33eddaf41d225d99b40f9eedbd0fac4c08c05 (diff)
lockdep: Introduce lockdep_assert_held()
Add a lockdep helper to validate that we indeed are the owner of a lock. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 1b59e265273..2c75f7daa43 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6609,6 +6609,8 @@ int cond_resched_lock(spinlock_t *lock)
int resched = should_resched();
int ret = 0;
+ lockdep_assert_held(lock);
+
if (spin_needbreak(lock) || resched) {
spin_unlock(lock);
if (resched)