mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
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>
This commit is contained in:
parent
f82b217e35
commit
4f3e7524b2
4 changed files with 28 additions and 16 deletions
|
|
@ -459,4 +459,16 @@ static inline void print_irqtrace_events(struct task_struct *curr)
|
|||
# define rwsem_release(l, n, i) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
||||
# ifdef CONFIG_PROVE_LOCKING
|
||||
# define map_acquire(l) lock_acquire(l, 0, 0, 0, 2, _THIS_IP_)
|
||||
# else
|
||||
# define map_acquire(l) lock_acquire(l, 0, 0, 0, 1, _THIS_IP_)
|
||||
# endif
|
||||
# define map_release(l) lock_release(l, 1, _THIS_IP_)
|
||||
#else
|
||||
# define map_acquire(l) do { } while (0)
|
||||
# define map_release(l) do { } while (0)
|
||||
#endif
|
||||
|
||||
#endif /* __LINUX_LOCKDEP_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue