From: Mathieu Desnoyers Date: Mon, 22 Mar 2010 19:09:44 +0000 (-0400) Subject: rbtree test: show tree X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=refs%2Fheads%2Frbtree;p=urcu.git rbtree test: show tree Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/test_urcu_rbtree.c b/tests/test_urcu_rbtree.c index 405c0da..300e738 100644 --- a/tests/test_urcu_rbtree.c +++ b/tests/test_urcu_rbtree.c @@ -42,7 +42,7 @@ #define NR_CPUS 16384 /* number of insert/delete */ -#define NR_RAND 3 +#define NR_RAND 4 #if defined(_syscall0) _syscall0(pid_t, gettid) @@ -277,6 +277,13 @@ void *thr_writer(void *_count) if (unlikely(wduration)) loop_sleep(wduration); + node = rcu_rbtree_min(rbtree_root, tree_comp); + while (node != &rcu_rbtree_nil) { + printf("0x%lX ", (unsigned long)node->key); + node = rcu_rbtree_next(node, tree_comp); + } + printf("\n"); + for (i = 0; i < NR_RAND; i++) { node = rcu_rbtree_search(rbtree_root, key[i], tree_comp);