X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Ftest_urcu_lfs.c;h=707becafc71d3bf5c073ad92af449d91347a3057;hb=a39bde3b86162601c7d670d97a962fc3f029fdbd;hp=67ccaa25f3f9911e77acbc22d62f43ba6d84ed1c;hpb=0663713865a25964c2932943c48e59ddf3caecd8;p=urcu.git diff --git a/tests/test_urcu_lfs.c b/tests/test_urcu_lfs.c index 67ccaa2..707beca 100644 --- a/tests/test_urcu_lfs.c +++ b/tests/test_urcu_lfs.c @@ -210,7 +210,7 @@ fail: count[1] = URCU_TLS(nr_successful_enqueues); printf_verbose("enqueuer thread_end, thread id : %lx, tid %lu, " "enqueues %llu successful_enqueues %llu\n", - pthread_self(), + (unsigned long) pthread_self(), (unsigned long) gettid(), URCU_TLS(nr_enqueues), URCU_TLS(nr_successful_enqueues)); return ((void*)1); @@ -274,6 +274,7 @@ void do_test_pop_all(enum test_sync sync) static void *thr_dequeuer(void *_count) { unsigned long long *count = _count; + unsigned int counter = 0; printf_verbose("thread_begin %s, thread id : %lx, tid %lu\n", "dequeuer", (unsigned long) pthread_self(), @@ -291,8 +292,6 @@ static void *thr_dequeuer(void *_count) assert(test_pop || test_pop_all); for (;;) { - unsigned int counter = 0; - if (test_pop && test_pop_all) { /* both pop and pop all */ if (counter & 1) @@ -317,7 +316,7 @@ static void *thr_dequeuer(void *_count) printf_verbose("dequeuer thread_end, thread id : %lx, tid %lu, " "dequeues %llu, successful_dequeues %llu\n", - pthread_self(), + (unsigned long) pthread_self(), (unsigned long) gettid(), URCU_TLS(nr_dequeues), URCU_TLS(nr_successful_dequeues)); count[0] = URCU_TLS(nr_dequeues);