rbtree: Use malloc/free directly in test
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 3 Jun 2011 14:16:59 +0000 (10:16 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 3 Jun 2011 14:16:59 +0000 (10:16 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/test_urcu_rbtree.c

index ac6425fd2b206e02ed270758ef391e634c6fe0bd..a15045b5d0681b95227404b02e570c8538558019 100644 (file)
@@ -71,17 +71,6 @@ static inline pid_t gettid(void)
 #include <urcu/rcurbtree.h>
 #include <urcu-defer.h>
 
-/* TODO: error handling testing for -ENOMEM */
-void *rbtree_alloc(size_t size)
-{
-       return malloc(size);
-}
-
-void rbtree_free(void *ptr)
-{
-       free(ptr);
-}
-
 int tree_comp(void *a, void *b)
 {
        if ((unsigned long)a < (unsigned long)b)
@@ -92,7 +81,7 @@ int tree_comp(void *a, void *b)
                return 0;
 }
 
-static DEFINE_RCU_RBTREE(rbtree, tree_comp, rbtree_alloc, rbtree_free);
+static DEFINE_RCU_RBTREE(rbtree, tree_comp, malloc, free);
 
 static volatile int test_go, test_stop;
 
This page took 0.025705 seconds and 4 git commands to generate.