From: Mathieu Desnoyers Date: Fri, 31 Dec 2010 17:53:34 +0000 (-0500) Subject: rcu_defer test: handle error value X-Git-Tag: v0.5.3~11 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6ade67d5cb23ae9e2c18e7c2a62e3202552fb9e2;p=urcu.git rcu_defer test: handle error value Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/test_urcu_defer.c b/tests/test_urcu_defer.c index c333964..248ac30 100644 --- a/tests/test_urcu_defer.c +++ b/tests/test_urcu_defer.c @@ -236,13 +236,18 @@ void *thr_writer(void *data) { unsigned long wtidx = (unsigned long)data; struct test_array *new, *old = NULL; + int ret; printf_verbose("thread_begin %s, thread id : %lx, tid %lu\n", "writer", pthread_self(), (unsigned long)gettid()); set_affinity(); - rcu_defer_register_thread(); + ret = rcu_defer_register_thread(); + if (ret) { + printf("Error in rcu_defer_register_thread\n"); + exit(-1); + } while (!test_go) { diff --git a/tests/test_urcu_lfq.c b/tests/test_urcu_lfq.c index de7c8a3..5fd0ff3 100644 --- a/tests/test_urcu_lfq.c +++ b/tests/test_urcu_lfq.c @@ -217,7 +217,11 @@ void *thr_dequeuer(void *_count) set_affinity(); - rcu_defer_register_thread(); + ret = rcu_defer_register_thread(); + if (ret) { + printf("Error in rcu_defer_register_thread\n"); + exit(-1); + } rcu_register_thread(); while (!test_go) diff --git a/tests/test_urcu_lfs.c b/tests/test_urcu_lfs.c index 8335f24..a1d6a1f 100644 --- a/tests/test_urcu_lfs.c +++ b/tests/test_urcu_lfs.c @@ -209,7 +209,11 @@ void *thr_dequeuer(void *_count) set_affinity(); - rcu_defer_register_thread(); + ret = rcu_defer_register_thread(); + if (ret) { + printf("Error in rcu_defer_register_thread\n"); + exit(-1); + } rcu_register_thread(); while (!test_go)