bianbu-linux-6.6/tools/testing/radix-tree/linux/radix-tree.h
Rehas Sachdeva c6ce3e2fe3 radix tree test suite: Add config option for map shift
Add config option "SHIFT=<value>" to Makefile for building test suite
with any value of RADIX_TREE_MAP_SHIFT between 3 and 7 inclusive.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
[mawilcox@microsoft.com: .gitignore, quieten grep, remove on clean]
Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
2017-02-13 21:44:10 -05:00

26 lines
651 B
C

#ifndef _TEST_RADIX_TREE_H
#define _TEST_RADIX_TREE_H
#include "generated/map-shift.h"
#include "../../../../include/linux/radix-tree.h"
extern int kmalloc_verbose;
extern int test_verbose;
static inline void trace_call_rcu(struct rcu_head *head,
void (*func)(struct rcu_head *head))
{
if (kmalloc_verbose)
printf("Delaying free of %p to slab\n", (char *)head -
offsetof(struct radix_tree_node, rcu_head));
call_rcu(head, func);
}
#define printv(verbosity_level, fmt, ...) \
if(test_verbose >= verbosity_level) \
printf(fmt, ##__VA_ARGS__)
#undef call_rcu
#define call_rcu(x, y) trace_call_rcu(x, y)
#endif /* _TEST_RADIX_TREE_H */