1 #ifndef __LINUX_DEBUG_LOCKING_H
2 #define __LINUX_DEBUG_LOCKING_H
4 #include <linux/kernel.h>
8 extern int debug_locks
;
9 extern int debug_locks_silent
;
12 * Generic 'turn off all lock debugging' function:
14 extern int debug_locks_off(void);
16 #define DEBUG_LOCKS_WARN_ON(c) \
21 if (debug_locks_off() && !debug_locks_silent) \
29 # define SMP_DEBUG_LOCKS_WARN_ON(c) DEBUG_LOCKS_WARN_ON(c)
31 # define SMP_DEBUG_LOCKS_WARN_ON(c) do { } while (0)
34 #ifdef CONFIG_DEBUG_LOCKING_API_SELFTESTS
35 extern void locking_selftest(void);
37 # define locking_selftest() do { } while (0)
43 extern void debug_show_all_locks(void);
44 extern void __debug_show_held_locks(struct task_struct
*task
);
45 extern void debug_show_held_locks(struct task_struct
*task
);
46 extern void debug_check_no_locks_freed(const void *from
, unsigned long len
);
47 extern void debug_check_no_locks_held(struct task_struct
*task
);
49 static inline void debug_show_all_locks(void)
53 static inline void __debug_show_held_locks(struct task_struct
*task
)
57 static inline void debug_show_held_locks(struct task_struct
*task
)
62 debug_check_no_locks_freed(const void *from
, unsigned long len
)
67 debug_check_no_locks_held(struct task_struct
*task
)