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