aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lockdep.h
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2008-08-11 03:30:23 -0400
committerIngo Molnar <mingo@elte.hu>2008-08-11 03:30:23 -0400
commit4f3e7524b2e703d9f8b02ac338153a53dd7ede66 (patch)
tree0033ade94f230d6044ad318e3791c55ad611069e /include/linux/lockdep.h
parentf82b217e3513fe3af342c0f3ee1494e86250c21c (diff)
lockdep: map_acquire
Most the free-standing lock_acquire() usages look remarkably similar, sweep them into a new helper. 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.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index b49bfa8e4a5c..e431d1d6eaf3 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -459,4 +459,16 @@ static inline void print_irqtrace_events(struct task_struct *curr)
459# define rwsem_release(l, n, i) do { } while (0) 459# define rwsem_release(l, n, i) do { } while (0)
460#endif 460#endif
461 461
462#ifdef CONFIG_DEBUG_LOCK_ALLOC
463# ifdef CONFIG_PROVE_LOCKING
464# define map_acquire(l) lock_acquire(l, 0, 0, 0, 2, _THIS_IP_)
465# else
466# define map_acquire(l) lock_acquire(l, 0, 0, 0, 1, _THIS_IP_)
467# endif
468# define map_release(l) lock_release(l, 1, _THIS_IP_)
469#else
470# define map_acquire(l) do { } while (0)
471# define map_release(l) do { } while (0)
472#endif
473
462#endif /* __LINUX_LOCKDEP_H */ 474#endif /* __LINUX_LOCKDEP_H */