radix-tree.h 690 B

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _TEST_RADIX_TREE_H
  3. #define _TEST_RADIX_TREE_H
  4. #include "generated/map-shift.h"
  5. #include "../../../../include/linux/radix-tree.h"
  6. extern int kmalloc_verbose;
  7. extern int test_verbose;
  8. static inline void trace_call_rcu(struct rcu_head *head,
  9. void (*func)(struct rcu_head *head))
  10. {
  11. if (kmalloc_verbose)
  12. printf("Delaying free of %p to slab\n", (char *)head -
  13. offsetof(struct radix_tree_node, rcu_head));
  14. call_rcu(head, func);
  15. }
  16. #define printv(verbosity_level, fmt, ...) \
  17. if(test_verbose >= verbosity_level) \
  18. printf(fmt, ##__VA_ARGS__)
  19. #undef call_rcu
  20. #define call_rcu(x, y) trace_call_rcu(x, y)
  21. #endif /* _TEST_RADIX_TREE_H */