aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lockdep.h
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2008-08-11 09:30:24 +0200
committerIngo Molnar <mingo@elte.hu>2008-08-11 09:30:24 +0200
commitb7d39aff91454f2534db2275f55908656ec0470c (patch)
tree24481f2fe7206ef69800a33df6ac3e1716085326 /include/linux/lockdep.h
parentlockdep: lock protection locks (diff)
downloadlinux-dev-b7d39aff91454f2534db2275f55908656ec0470c.tar.xz
linux-dev-b7d39aff91454f2534db2275f55908656ec0470c.zip
lockdep: spin_lock_nest_lock()
Expose the new lock protection lock. This can be used to annotate places where we take multiple locks of the same class and avoid deadlocks by always taking another (top-level) lock first. NOTE: we're still bound to the MAX_LOCK_DEPTH (48) limit. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/lockdep.h')
-rw-r--r--include/linux/lockdep.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 93a8cc02a033..4452c04a7f6e 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -410,8 +410,10 @@ static inline void print_irqtrace_events(struct task_struct *curr)
#ifdef CONFIG_DEBUG_LOCK_ALLOC
# ifdef CONFIG_PROVE_LOCKING
# define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i)
+# define spin_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 2, n, i)
# else
# define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i)
+# define spin_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 1, NULL, i)
# endif
# define spin_release(l, n, i) lock_release(l, n, i)
#else