X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Ftest_urcu_defer.c;h=7d71f1029f45f0d97d933e6d85a97ded23dd85ef;hb=65fcc7e9957a1658327acd121c3d8c3b36f4a94e;hp=c333964ce9a998c094c5c831476189acce791409;hpb=06f22bdbb0c4c4d5db42a2e2dc35818aa61415be;p=urcu.git diff --git a/tests/test_urcu_defer.c b/tests/test_urcu_defer.c index c333964..7d71f10 100644 --- a/tests/test_urcu_defer.c +++ b/tests/test_urcu_defer.c @@ -31,12 +31,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + /* hardcoded number of CPUs */ #define NR_CPUS 16384 @@ -236,13 +239,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) {