Cleanup test usage printout
[urcu.git] / tests / test_urcu_bp.c
index 8cb74ff560d7d6e40e452e6b0a3b3a097640db9d..b59f16dc08e82fe8b8ed5b719a1c28272700fcda 100644 (file)
@@ -187,6 +187,7 @@ void *thr_reader(void *_count)
        set_affinity();
 
        rcu_register_thread();
+       assert(!rcu_read_ongoing());
 
        while (!test_go)
        {
@@ -195,6 +196,7 @@ void *thr_reader(void *_count)
 
        for (;;) {
                rcu_read_lock();
+               assert(rcu_read_ongoing());
                local_ptr = rcu_dereference(test_rcu_pointer);
                rcu_debug_yield_read();
                if (local_ptr)
@@ -259,15 +261,17 @@ void *thr_writer(void *_count)
 
 void show_usage(int argc, char **argv)
 {
-       printf("Usage : %s nr_readers nr_writers duration (s)", argv[0]);
+       printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
+               argv[0]);
+       printf("OPTIONS:\n");
 #ifdef DEBUG_YIELD
-       printf(" [-r] [-w] (yield reader and/or writer)");
+       printf("        [-r] [-w] (yield reader and/or writer)\n");
 #endif
-       printf(" [-d delay] (writer period (us))");
-       printf(" [-c duration] (reader C.S. duration (in loops))");
-       printf(" [-e duration] (writer C.S. duration (in loops))");
-       printf(" [-v] (verbose output)");
-       printf(" [-a cpu#] [-a cpu#]... (affinity)");
+       printf("        [-d delay] (writer period (us))\n");
+       printf("        [-c duration] (reader C.S. duration (in loops))\n");
+       printf("        [-e duration] (writer C.S. duration (in loops))\n");
+       printf("        [-v] (verbose output)\n");
+       printf("        [-a cpu#] [-a cpu#]... (affinity)\n");
        printf("\n");
 }
 
This page took 0.023209 seconds and 4 git commands to generate.