Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _TEST_RADIX_TREE_H
0003 #define _TEST_RADIX_TREE_H
0004 
0005 #include "../../../../include/linux/radix-tree.h"
0006 
0007 extern int kmalloc_verbose;
0008 extern int test_verbose;
0009 
0010 static inline void trace_call_rcu(struct rcu_head *head,
0011         void (*func)(struct rcu_head *head))
0012 {
0013     if (kmalloc_verbose)
0014         printf("Delaying free of %p to slab\n", (char *)head -
0015                 offsetof(struct radix_tree_node, rcu_head));
0016     call_rcu(head, func);
0017 }
0018 
0019 #define printv(verbosity_level, fmt, ...) \
0020     if(test_verbose >= verbosity_level) \
0021         printf(fmt, ##__VA_ARGS__)
0022 
0023 #undef call_rcu
0024 #define call_rcu(x, y) trace_call_rcu(x, y)
0025 
0026 #endif /* _TEST_RADIX_TREE_H */