summaryrefslogtreecommitdiffstats
path: root/include/linux/lockdep.h
diff options
context:
space:
mode:
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 b49bfa8..e431d1d 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)
# 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 */
OpenPOWER on IntegriCloud