X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Ftest_urcu_lfs.c;h=9636f5bb0da7a935f3e52092d0b3cbef1278cea8;hb=8ff97cc3836c6a2739b62af0a859511c9c284e4f;hp=45ed0628fc3dc5073fe10329319ed6860aa4133b;hpb=2953b501ab1dcf908d07de9b414a08397519f5b6;p=urcu.git diff --git a/tests/test_urcu_lfs.c b/tests/test_urcu_lfs.c index 45ed062..9636f5b 100644 --- a/tests/test_urcu_lfs.c +++ b/tests/test_urcu_lfs.c @@ -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) @@ -343,15 +342,17 @@ static void test_end(struct cds_lfs_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(" [-R] (use RCU external synchronization)"); - printf(" Note: default: no external synchronization used."); + 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(" [-R] (use RCU external synchronization)\n"); + printf(" Note: default: no external synchronization used.\n"); printf("\n"); }