lockdep.c 764 B

123456789101112131415161718192021222324252627282930313233
  1. // SPDX-License-Identifier: GPL-2.0
  2. #include <linux/lockdep.h>
  3. #include <stdlib.h>
  4. /* Trivial API wrappers, we don't (yet) have RCU in user-space: */
  5. #define hlist_for_each_entry_rcu hlist_for_each_entry
  6. #define hlist_add_head_rcu hlist_add_head
  7. #define hlist_del_rcu hlist_del
  8. #define list_for_each_entry_rcu list_for_each_entry
  9. #define list_add_tail_rcu list_add_tail
  10. u32 prandom_u32(void)
  11. {
  12. /* Used only by lock_pin_lock() which is dead code */
  13. abort();
  14. }
  15. void print_irqtrace_events(struct task_struct *curr)
  16. {
  17. abort();
  18. }
  19. static struct new_utsname *init_utsname(void)
  20. {
  21. static struct new_utsname n = (struct new_utsname) {
  22. .release = "liblockdep",
  23. .version = LIBLOCKDEP_VERSION,
  24. };
  25. return &n;
  26. }
  27. #include "../../../kernel/locking/lockdep.c"