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