diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-07-20 13:16:29 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-02 09:41:34 -0400 |
commit | f607c6685774811b8112e124f10a053d77015485 (patch) | |
tree | 4d32d967c8f8fb37ae09319735062a131a91725b /kernel/sched.c | |
parent | 98c33eddaf41d225d99b40f9eedbd0fac4c08c05 (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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 1b59e265273b..2c75f7daa439 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -6609,6 +6609,8 @@ int cond_resched_lock(spinlock_t *lock) | |||
6609 | int resched = should_resched(); | 6609 | int resched = should_resched(); |
6610 | int ret = 0; | 6610 | int ret = 0; |
6611 | 6611 | ||
6612 | lockdep_assert_held(lock); | ||
6613 | |||
6612 | if (spin_needbreak(lock) || resched) { | 6614 | if (spin_needbreak(lock) || resched) { |
6613 | spin_unlock(lock); | 6615 | spin_unlock(lock); |
6614 | if (resched) | 6616 | if (resched) |