X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Ftest_urcu_wfs.c;h=9ec95ef197643f787b1c8e8fb61e755091f398e4;hb=a39bde3b86162601c7d670d97a962fc3f029fdbd;hp=338954faeb351f777591e062493cef67397371a7;hpb=d89f0c51ed502c4248211eb43292e92a98ffe31b;p=userspace-rcu.git diff --git a/tests/test_urcu_wfs.c b/tests/test_urcu_wfs.c index 338954f..9ec95ef 100644 --- a/tests/test_urcu_wfs.c +++ b/tests/test_urcu_wfs.c @@ -213,7 +213,7 @@ fail: printf_verbose("enqueuer thread_end, thread id : %lx, tid %lu, " "enqueues %llu successful_enqueues %llu, " "empty_dest_enqueues %llu\n", - pthread_self(), + (unsigned long) pthread_self(), (unsigned long) gettid(), URCU_TLS(nr_enqueues), URCU_TLS(nr_successful_enqueues), @@ -270,7 +270,7 @@ static void do_test_pop_all(enum test_sync sync) static void *thr_dequeuer(void *_count) { unsigned long long *count = _count; - unsigned int counter; + unsigned int counter = 0; printf_verbose("thread_begin %s, thread id : %lx, tid %lu\n", "dequeuer", (unsigned long) pthread_self(), @@ -308,7 +308,7 @@ static void *thr_dequeuer(void *_count) printf_verbose("dequeuer thread_end, thread id : %lx, tid %lu, " "dequeues %llu, successful_dequeues %llu " "pop_all %llu pop_last %llu\n", - pthread_self(), + (unsigned long) pthread_self(), (unsigned long) gettid(), URCU_TLS(nr_dequeues), URCU_TLS(nr_successful_dequeues), URCU_TLS(nr_pop_all), @@ -339,17 +339,19 @@ static void test_end(struct cds_wfs_stack *s, unsigned long long *nr_dequeues, static void show_usage(int argc, char **argv) { - printf("Usage : %s nr_dequeuers nr_enqueuers duration (s)", argv[0]); - printf(" [-d delay] (enqueuer period (in loops))"); - printf(" [-c duration] (dequeuer period (in loops))"); - printf(" [-v] (verbose output)"); - printf(" [-a cpu#] [-a cpu#]... (affinity)"); - printf(" [-p] (test pop)"); - printf(" [-P] (test pop_all, enabled by default)"); - printf(" [-M] (use mutex external synchronization)"); - printf(" Note: default: no external synchronization used."); - printf(" [-f] (force user-provided synchronization)"); - printf(" [-w] Wait for dequeuer to empty stack"); + printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) \n", + argv[0]); + printf("OPTIONS:\n"); + printf(" [-d delay] (enqueuer period (in loops))\n"); + printf(" [-c duration] (dequeuer period (in loops))\n"); + printf(" [-v] (verbose output)\n"); + printf(" [-a cpu#] [-a cpu#]... (affinity)\n"); + printf(" [-p] (test pop)\n"); + printf(" [-P] (test pop_all, enabled by default)\n"); + printf(" [-M] (use mutex external synchronization)\n"); + printf(" Note: default: no external synchronization used.\n"); + printf(" [-f] (force user-provided synchronization)\n"); + printf(" [-w] Wait for dequeuer to empty stack\n"); printf("\n"); }