2#ifndef __LINUX_DEBUG_LOCKING_H
3#define __LINUX_DEBUG_LOCKING_H
16 return xchg(&debug_locks, 0);
24#define DEBUG_LOCKS_WARN_ON(c) \
28 if (!oops_in_progress && unlikely(c)) { \
29 instrumentation_begin(); \
30 if (debug_locks_off() && !debug_locks_silent) \
31 WARN(1, "DEBUG_LOCKS_WARN_ON(%s)", #c); \
32 instrumentation_end(); \
39# define SMP_DEBUG_LOCKS_WARN_ON(c) DEBUG_LOCKS_WARN_ON(c)
41# define SMP_DEBUG_LOCKS_WARN_ON(c) do { } while (0)
44#ifdef CONFIG_DEBUG_LOCKING_API_SELFTESTS
47# define locking_selftest() do { } while (0)
51extern void debug_show_all_locks(
void);
52extern void debug_show_held_locks(
struct task_struct *task);
53extern void debug_check_no_locks_freed(
const void *from,
unsigned long len);
54extern void debug_check_no_locks_held(
void);
56static inline void debug_show_all_locks(
void)
60static inline void debug_show_held_locks(
struct task_struct *task)
65debug_check_no_locks_freed(
const void *from,
unsigned long len)
70debug_check_no_locks_held(
void)
#define __always_inline
Definition compiler_attributes.h:55
int debug_locks __read_mostly
Definition debug_locks.h:11
int debug_locks_off(void)
#define locking_selftest()
Definition debug_locks.h:47
size_t len
Definition initial.c:23
#define xchg(ptr, v)
Definition kernel.h:683