From: Mathieu Desnoyers Date: Fri, 3 Jun 2011 14:16:59 +0000 (-0400) Subject: rbtree: Use malloc/free directly in test X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8f5e02b184ea447e77b4e7334fe75fbee54ca8e7;p=userspace-rcu.git rbtree: Use malloc/free directly in test Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/test_urcu_rbtree.c b/tests/test_urcu_rbtree.c index ac6425f..a15045b 100644 --- a/tests/test_urcu_rbtree.c +++ b/tests/test_urcu_rbtree.c @@ -71,17 +71,6 @@ static inline pid_t gettid(void) #include #include -/* 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;