at v4.13 1.4 kB view raw
1#ifndef _LIBLOCKDEP_LOCKDEP_H_ 2#define _LIBLOCKDEP_LOCKDEP_H_ 3 4#include <sys/prctl.h> 5#include <sys/syscall.h> 6#include <string.h> 7#include <limits.h> 8#include <linux/utsname.h> 9#include <linux/compiler.h> 10#include <linux/export.h> 11#include <linux/kern_levels.h> 12#include <linux/err.h> 13#include <linux/rcu.h> 14#include <linux/list.h> 15#include <linux/hardirq.h> 16#include <unistd.h> 17 18#define MAX_LOCK_DEPTH 63UL 19 20#define asmlinkage 21#define __visible 22 23#include "../../../include/linux/lockdep.h" 24 25struct task_struct { 26 u64 curr_chain_key; 27 int lockdep_depth; 28 unsigned int lockdep_recursion; 29 struct held_lock held_locks[MAX_LOCK_DEPTH]; 30 gfp_t lockdep_reclaim_gfp; 31 int pid; 32 char comm[17]; 33}; 34 35extern struct task_struct *__curr(void); 36 37#define current (__curr()) 38 39static inline int debug_locks_off(void) 40{ 41 return 1; 42} 43 44#define task_pid_nr(tsk) ((tsk)->pid) 45 46#define KSYM_NAME_LEN 128 47#define printk(...) dprintf(STDOUT_FILENO, __VA_ARGS__) 48#define pr_err(format, ...) fprintf (stderr, format, ## __VA_ARGS__) 49#define pr_warn pr_err 50 51#define list_del_rcu list_del 52 53#define atomic_t unsigned long 54#define atomic_inc(x) ((*(x))++) 55 56#define print_tainted() "" 57#define static_obj(x) 1 58 59#define debug_show_all_locks() 60extern void debug_check_no_locks_held(void); 61 62static __used bool __is_kernel_percpu_address(unsigned long addr, void *can_addr) 63{ 64 return false; 65} 66 67#endif