radix-tree.h 657 B

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