aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lockdep.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/lockdep.h')
-rw-r--r--include/linux/lockdep.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 9ccf0e286b2a..06aed8305bf3 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -12,6 +12,10 @@
12struct task_struct; 12struct task_struct;
13struct lockdep_map; 13struct lockdep_map;
14 14
15/* for sysctl */
16extern int prove_locking;
17extern int lock_stat;
18
15#ifdef CONFIG_LOCKDEP 19#ifdef CONFIG_LOCKDEP
16 20
17#include <linux/linkage.h> 21#include <linux/linkage.h>
@@ -40,6 +44,8 @@ struct lock_class_key {
40 struct lockdep_subclass_key subkeys[MAX_LOCKDEP_SUBCLASSES]; 44 struct lockdep_subclass_key subkeys[MAX_LOCKDEP_SUBCLASSES];
41}; 45};
42 46
47extern struct lock_class_key __lockdep_no_validate__;
48
43#define LOCKSTAT_POINTS 4 49#define LOCKSTAT_POINTS 4
44 50
45/* 51/*
@@ -266,6 +272,9 @@ extern void lockdep_init_map(struct lockdep_map *lock, const char *name,
266#define lockdep_set_subclass(lock, sub) \ 272#define lockdep_set_subclass(lock, sub) \
267 lockdep_init_map(&(lock)->dep_map, #lock, \ 273 lockdep_init_map(&(lock)->dep_map, #lock, \
268 (lock)->dep_map.key, sub) 274 (lock)->dep_map.key, sub)
275
276#define lockdep_set_novalidate_class(lock) \
277 lockdep_set_class(lock, &__lockdep_no_validate__)
269/* 278/*
270 * Compare locking classes 279 * Compare locking classes
271 */ 280 */
@@ -350,6 +359,9 @@ static inline void lockdep_on(void)
350#define lockdep_set_class_and_subclass(lock, key, sub) \ 359#define lockdep_set_class_and_subclass(lock, key, sub) \
351 do { (void)(key); } while (0) 360 do { (void)(key); } while (0)
352#define lockdep_set_subclass(lock, sub) do { } while (0) 361#define lockdep_set_subclass(lock, sub) do { } while (0)
362
363#define lockdep_set_novalidate_class(lock) do { } while (0)
364
353/* 365/*
354 * We don't define lockdep_match_class() and lockdep_match_key() for !LOCKDEP 366 * We don't define lockdep_match_class() and lockdep_match_key() for !LOCKDEP
355 * case since the result is not well defined and the caller should rather 367 * case since the result is not well defined and the caller should rather
@@ -534,4 +546,8 @@ do { \
534# define might_lock_read(lock) do { } while (0) 546# define might_lock_read(lock) do { } while (0)
535#endif 547#endif
536 548
549#ifdef CONFIG_PROVE_RCU
550extern void lockdep_rcu_dereference(const char *file, const int line);
551#endif
552
537#endif /* __LINUX_LOCKDEP_H */ 553#endif /* __LINUX_LOCKDEP_H */