lockdep.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef _LIBLOCKDEP_LOCKDEP_H_
  2. #define _LIBLOCKDEP_LOCKDEP_H_
  3. #include <sys/prctl.h>
  4. #include <sys/syscall.h>
  5. #include <string.h>
  6. #include <limits.h>
  7. #include <linux/utsname.h>
  8. #include <linux/compiler.h>
  9. #define MAX_LOCK_DEPTH 2000UL
  10. #define asmlinkage
  11. #define __visible
  12. #include "../../../include/linux/lockdep.h"
  13. struct task_struct {
  14. u64 curr_chain_key;
  15. int lockdep_depth;
  16. unsigned int lockdep_recursion;
  17. struct held_lock held_locks[MAX_LOCK_DEPTH];
  18. gfp_t lockdep_reclaim_gfp;
  19. int pid;
  20. char comm[17];
  21. };
  22. extern struct task_struct *__curr(void);
  23. #define current (__curr())
  24. #define debug_locks_off() 1
  25. #define task_pid_nr(tsk) ((tsk)->pid)
  26. #define KSYM_NAME_LEN 128
  27. #define printk printf
  28. #define list_del_rcu list_del
  29. #define atomic_t unsigned long
  30. #define atomic_inc(x) ((*(x))++)
  31. static struct new_utsname *init_utsname(void)
  32. {
  33. static struct new_utsname n = (struct new_utsname) {
  34. .release = "liblockdep",
  35. .version = LIBLOCKDEP_VERSION,
  36. };
  37. return &n;
  38. }
  39. #define print_tainted() ""
  40. #define static_obj(x) 1
  41. #define debug_show_all_locks()
  42. extern void debug_check_no_locks_held(void);
  43. #endif