]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - tools/testing/radix-tree/linux/radix-tree.h
radix tree test suite: Introduce kmalloc_verbose
[mirror_ubuntu-bionic-kernel.git] / tools / testing / radix-tree / linux / radix-tree.h
CommitLineData
5eeb2d23
MW
1#ifndef _TEST_RADIX_TREE_H
2#define _TEST_RADIX_TREE_H
1366c37e 3#include "../../../../include/linux/radix-tree.h"
5eeb2d23
MW
4
5extern int kmalloc_verbose;
6
7static 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#undef call_rcu
16#define call_rcu(x, y) trace_call_rcu(x, y)
17
18#endif /* _TEST_RADIX_TREE_H */