rcu_defer test: handle error value
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 31 Dec 2010 17:53:34 +0000 (12:53 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 31 Dec 2010 17:53:34 +0000 (12:53 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/test_urcu_defer.c
tests/test_urcu_lfq.c
tests/test_urcu_lfs.c

index c333964ce9a998c094c5c831476189acce791409..248ac306f9d93b36312ecce453f077542fe21149 100644 (file)
@@ -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)
        {
index de7c8a39a209d30e54fd652c69e4f6fc72db0819..5fd0ff38cb0ecd15a462072394a18ac7598a3ae1 100644 (file)
@@ -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)
index 8335f2459f1f05533da21d5f0cc557ef815e28d9..a1d6a1f063946a51ec27348dbdfc6748494d679f 100644 (file)
@@ -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)
This page took 0.027403 seconds and 4 git commands to generate.