aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/radix-tree/linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/radix-tree/linux.c')
-rw-r--r--tools/testing/radix-tree/linux.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/tools/testing/radix-tree/linux.c b/tools/testing/radix-tree/linux.c
index d31ea7c9abec..c27c11261c37 100644
--- a/tools/testing/radix-tree/linux.c
+++ b/tools/testing/radix-tree/linux.c
@@ -5,7 +5,6 @@
5#include <unistd.h> 5#include <unistd.h>
6#include <assert.h> 6#include <assert.h>
7 7
8#include <linux/mempool.h>
9#include <linux/poison.h> 8#include <linux/poison.h>
10#include <linux/slab.h> 9#include <linux/slab.h>
11#include <linux/radix-tree.h> 10#include <linux/radix-tree.h>
@@ -22,27 +21,6 @@ struct kmem_cache {
22 void (*ctor)(void *); 21 void (*ctor)(void *);
23}; 22};
24 23
25void *mempool_alloc(mempool_t *pool, int gfp_mask)
26{
27 return pool->alloc(gfp_mask, pool->data);
28}
29
30void mempool_free(void *element, mempool_t *pool)
31{
32 pool->free(element, pool->data);
33}
34
35mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn,
36 mempool_free_t *free_fn, void *pool_data)
37{
38 mempool_t *ret = malloc(sizeof(*ret));
39
40 ret->alloc = alloc_fn;
41 ret->free = free_fn;
42 ret->data = pool_data;
43 return ret;
44}
45
46void *kmem_cache_alloc(struct kmem_cache *cachep, int flags) 24void *kmem_cache_alloc(struct kmem_cache *cachep, int flags)
47{ 25{
48 struct radix_tree_node *node; 26 struct radix_tree_node *node;