From: Michael Jeanson Date: Thu, 1 Apr 2021 17:13:48 +0000 (-0400) Subject: cleanup: all functions have declarations (-Wmissing-prototypes) X-Git-Tag: v0.13.0~22 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=61c3fb603104bda9e67c0690c1964e61a770d045;p=userspace-rcu.git cleanup: all functions have declarations (-Wmissing-prototypes) Make sure that all non-static functions have a declaration. Change-Id: Ie1596ad4ba876183862e51508c8bd7fc0451fc5e Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/src/rculfhash.c b/src/rculfhash.c index 247564b..ca9c83c 100644 --- a/src/rculfhash.c +++ b/src/rculfhash.c @@ -581,6 +581,7 @@ unsigned int cds_lfht_fls_ulong(unsigned long x) * Return the minimum order for which x <= (1UL << order). * Return -1 if x is 0. */ +static int cds_lfht_get_count_order_u32(uint32_t x) { if (!x) diff --git a/tests/benchmark/test_mutex.c b/tests/benchmark/test_mutex.c index e1bfc17..8da8b04 100644 --- a/tests/benchmark/test_mutex.c +++ b/tests/benchmark/test_mutex.c @@ -137,27 +137,7 @@ static unsigned int nr_writers; pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER; -void rcu_copy_mutex_lock(void) -{ - int ret; - ret = pthread_mutex_lock(&rcu_copy_mutex); - if (ret) { - perror("Error in pthread mutex lock"); - exit(-1); - } -} - -void rcu_copy_mutex_unlock(void) -{ - int ret; - - ret = pthread_mutex_unlock(&rcu_copy_mutex); - if (ret) { - perror("Error in pthread mutex unlock"); - exit(-1); - } -} - +static void *thr_reader(void *data) { unsigned long tidx = (unsigned long)data; @@ -192,6 +172,7 @@ void *thr_reader(void *data) } +static void *thr_writer(void *data) { unsigned long wtidx = (unsigned long)data; @@ -226,6 +207,7 @@ void *thr_writer(void *data) return ((void*)2); } +static void show_usage(int argc, char **argv) { printf("Usage : %s nr_readers nr_writers duration (s) \n", diff --git a/tests/benchmark/test_perthreadlock.c b/tests/benchmark/test_perthreadlock.c index 6e07927..ac21444 100644 --- a/tests/benchmark/test_perthreadlock.c +++ b/tests/benchmark/test_perthreadlock.c @@ -165,6 +165,7 @@ static void urcu_mutex_unlock(pthread_mutex_t *lock) } } +static void *thr_reader(void *data) { unsigned long tidx = (unsigned long)data; @@ -199,6 +200,7 @@ void *thr_reader(void *data) } +static void *thr_writer(void *data) { unsigned long wtidx = (unsigned long)data; @@ -238,6 +240,7 @@ void *thr_writer(void *data) return ((void*)2); } +static void show_usage(int argc, char **argv) { printf("Usage : %s nr_readers nr_writers duration (s) \n", diff --git a/tests/benchmark/test_perthreadlock_timing.c b/tests/benchmark/test_perthreadlock_timing.c index ca2953d..712eca1 100644 --- a/tests/benchmark/test_perthreadlock_timing.c +++ b/tests/benchmark/test_perthreadlock_timing.c @@ -67,6 +67,7 @@ static int num_write; static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *reader_time; static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *writer_time; +static void *thr_reader(void *arg) { caa_cycles_t time1, time2; @@ -105,6 +106,7 @@ void *thr_reader(void *arg) } +static void *thr_writer(void *arg) { caa_cycles_t time1, time2; diff --git a/tests/benchmark/test_rwlock.c b/tests/benchmark/test_rwlock.c index b6623c9..530db82 100644 --- a/tests/benchmark/test_rwlock.c +++ b/tests/benchmark/test_rwlock.c @@ -137,27 +137,7 @@ static unsigned int nr_writers; pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER; -void rcu_copy_mutex_lock(void) -{ - int ret; - ret = pthread_mutex_lock(&rcu_copy_mutex); - if (ret) { - perror("Error in pthread mutex lock"); - exit(-1); - } -} - -void rcu_copy_mutex_unlock(void) -{ - int ret; - - ret = pthread_mutex_unlock(&rcu_copy_mutex); - if (ret) { - perror("Error in pthread mutex unlock"); - exit(-1); - } -} - +static void *thr_reader(void *_count) { unsigned long long *count = _count; @@ -204,6 +184,7 @@ void *thr_reader(void *_count) } +static void *thr_writer(void *_count) { unsigned long long *count = _count; @@ -251,6 +232,7 @@ void *thr_writer(void *_count) return ((void*)2); } +static void show_usage(int argc, char **argv) { printf("Usage : %s nr_readers nr_writers duration (s) \n", diff --git a/tests/benchmark/test_rwlock_timing.c b/tests/benchmark/test_rwlock_timing.c index 0cc5253..a7d035e 100644 --- a/tests/benchmark/test_rwlock_timing.c +++ b/tests/benchmark/test_rwlock_timing.c @@ -67,6 +67,7 @@ static int num_write; static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *reader_time; static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *writer_time; +static void *thr_reader(void *arg) { unsigned int i, j; @@ -106,6 +107,7 @@ void *thr_reader(void *arg) } +static void *thr_writer(void *arg) { unsigned int i, j; diff --git a/tests/benchmark/test_urcu.c b/tests/benchmark/test_urcu.c index 9982f6d..19ddf34 100644 --- a/tests/benchmark/test_urcu.c +++ b/tests/benchmark/test_urcu.c @@ -128,27 +128,7 @@ static unsigned int nr_writers; pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER; -void rcu_copy_mutex_lock(void) -{ - int ret; - ret = pthread_mutex_lock(&rcu_copy_mutex); - if (ret) { - perror("Error in pthread mutex lock"); - exit(-1); - } -} - -void rcu_copy_mutex_unlock(void) -{ - int ret; - - ret = pthread_mutex_unlock(&rcu_copy_mutex); - if (ret) { - perror("Error in pthread mutex unlock"); - exit(-1); - } -} - +static void *thr_reader(void *_count) { unsigned long long *count = _count; @@ -195,6 +175,7 @@ void *thr_reader(void *_count) } +static void *thr_writer(void *_count) { unsigned long long *count = _count; @@ -234,6 +215,7 @@ void *thr_writer(void *_count) return ((void*)2); } +static void show_usage(int argc, char **argv) { printf("Usage : %s nr_readers nr_writers duration (s) \n", diff --git a/tests/benchmark/test_urcu_assign.c b/tests/benchmark/test_urcu_assign.c index 966cf9e..a7189a7 100644 --- a/tests/benchmark/test_urcu_assign.c +++ b/tests/benchmark/test_urcu_assign.c @@ -132,6 +132,7 @@ static unsigned int nr_writers; pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER; +static void rcu_copy_mutex_lock(void) { int ret; @@ -142,6 +143,7 @@ void rcu_copy_mutex_lock(void) } } +static void rcu_copy_mutex_unlock(void) { int ret; @@ -186,6 +188,7 @@ static void test_array_free(struct test_array *ptr) ptr->a = ARRAY_POISON; } +static void *thr_reader(void *_count) { unsigned long long *count = _count; @@ -226,6 +229,7 @@ void *thr_reader(void *_count) } +static void *thr_writer(void *_count) { unsigned long long *count = _count; @@ -267,6 +271,7 @@ void *thr_writer(void *_count) return ((void*)2); } +static void show_usage(int argc, char **argv) { printf("Usage : %s nr_readers nr_writers duration (s) \n", diff --git a/tests/benchmark/test_urcu_bp.c b/tests/benchmark/test_urcu_bp.c index cf5c0fe..2c51d0b 100644 --- a/tests/benchmark/test_urcu_bp.c +++ b/tests/benchmark/test_urcu_bp.c @@ -128,27 +128,7 @@ static unsigned int nr_writers; pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER; -void rcu_copy_mutex_lock(void) -{ - int ret; - ret = pthread_mutex_lock(&rcu_copy_mutex); - if (ret) { - perror("Error in pthread mutex lock"); - exit(-1); - } -} - -void rcu_copy_mutex_unlock(void) -{ - int ret; - - ret = pthread_mutex_unlock(&rcu_copy_mutex); - if (ret) { - perror("Error in pthread mutex unlock"); - exit(-1); - } -} - +static void *thr_reader(void *_count) { unsigned long long *count = _count; @@ -191,6 +171,7 @@ void *thr_reader(void *_count) } +static void *thr_writer(void *_count) { unsigned long long *count = _count; @@ -229,6 +210,7 @@ void *thr_writer(void *_count) return ((void*)2); } +static void show_usage(int argc, char **argv) { printf("Usage : %s nr_readers nr_writers duration (s) \n", diff --git a/tests/benchmark/test_urcu_defer.c b/tests/benchmark/test_urcu_defer.c index 97eadab..9f24de7 100644 --- a/tests/benchmark/test_urcu_defer.c +++ b/tests/benchmark/test_urcu_defer.c @@ -136,27 +136,7 @@ static unsigned int nr_writers; pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER; -void rcu_copy_mutex_lock(void) -{ - int ret; - ret = pthread_mutex_lock(&rcu_copy_mutex); - if (ret) { - perror("Error in pthread mutex lock"); - exit(-1); - } -} - -void rcu_copy_mutex_unlock(void) -{ - int ret; - - ret = pthread_mutex_unlock(&rcu_copy_mutex); - if (ret) { - perror("Error in pthread mutex unlock"); - exit(-1); - } -} - +static void *thr_reader(void *_count) { unsigned long long *count = _count; @@ -205,6 +185,7 @@ static void test_cb1(void *data) { } +static void *thr_writer(void *data) { unsigned long wtidx = (unsigned long)data; @@ -256,6 +237,7 @@ void *thr_writer(void *data) return ((void*)2); } +static void show_usage(int argc, char **argv) { printf("Usage : %s nr_readers nr_writers duration (s) \n", diff --git a/tests/benchmark/test_urcu_gc.c b/tests/benchmark/test_urcu_gc.c index 2ee0d22..2f35fe9 100644 --- a/tests/benchmark/test_urcu_gc.c +++ b/tests/benchmark/test_urcu_gc.c @@ -144,27 +144,7 @@ static unsigned int nr_writers; pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER; -void rcu_copy_mutex_lock(void) -{ - int ret; - ret = pthread_mutex_lock(&rcu_copy_mutex); - if (ret) { - perror("Error in pthread mutex lock"); - exit(-1); - } -} - -void rcu_copy_mutex_unlock(void) -{ - int ret; - - ret = pthread_mutex_unlock(&rcu_copy_mutex); - if (ret) { - perror("Error in pthread mutex unlock"); - exit(-1); - } -} - +static void *thr_reader(void *_count) { unsigned long long *count = _count; @@ -236,6 +216,7 @@ static void rcu_gc_reclaim(unsigned long wtidx, void *old) rcu_gc_clear_queue(wtidx); } +static void *thr_writer(void *data) { unsigned long wtidx = (unsigned long)data; @@ -277,6 +258,7 @@ void *thr_writer(void *data) return ((void*)2); } +static void show_usage(int argc, char **argv) { printf("Usage : %s nr_readers nr_writers duration (s) \n", diff --git a/tests/benchmark/test_urcu_hash.c b/tests/benchmark/test_urcu_hash.c index 2aa1e9d..2410ff7 100644 --- a/tests/benchmark/test_urcu_hash.c +++ b/tests/benchmark/test_urcu_hash.c @@ -56,26 +56,31 @@ struct test_hash_cb test_hash_cb[] = { static enum test_hash test_choice = TEST_HASH_RW; +static void (*get_sigusr1_cb(void))(int) { return test_hash_cb[test_choice].sigusr1; } +static void (*get_sigusr2_cb(void))(int) { return test_hash_cb[test_choice].sigusr2; } +static void *(*get_thr_reader_cb(void))(void *) { return test_hash_cb[test_choice].thr_reader; } +static void *(*get_thr_writer_cb(void))(void *) { return test_hash_cb[test_choice].thr_writer; } +static int (*get_populate_hash_cb(void))(void) { return test_hash_cb[test_choice].populate_hash; @@ -194,6 +199,7 @@ unsigned long test_compare(const void *key1, size_t key1_len, return 1; } +static void *thr_count(void *arg) { printf_verbose("thread_begin %s, tid %lu\n", @@ -259,6 +265,7 @@ void test_delete_all_nodes(struct cds_lfht *ht) printf("deleted %lu nodes.\n", count); } +static void show_usage(int argc, char **argv) { printf("Usage : %s nr_readers nr_writers duration (s) \n", diff --git a/tests/benchmark/test_urcu_lfq.c b/tests/benchmark/test_urcu_lfq.c index 45a6bb9..77ccb85 100644 --- a/tests/benchmark/test_urcu_lfq.c +++ b/tests/benchmark/test_urcu_lfq.c @@ -134,6 +134,7 @@ struct test { static struct cds_lfq_queue_rcu q; +static void *thr_enqueuer(void *_count) { unsigned long long *count = _count; @@ -189,6 +190,7 @@ void free_node_cb(struct rcu_head *head) free(node); } +static void *thr_dequeuer(void *_count) { unsigned long long *count = _count; @@ -238,6 +240,7 @@ void *thr_dequeuer(void *_count) return ((void*)2); } +static void test_end(struct cds_lfq_queue_rcu *q, unsigned long long *nr_dequeues) { struct cds_lfq_node_rcu *snode; @@ -254,6 +257,7 @@ void test_end(struct cds_lfq_queue_rcu *q, unsigned long long *nr_dequeues) } while (snode); } +static void show_usage(int argc, char **argv) { printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) \n", diff --git a/tests/benchmark/test_urcu_lfs_rcu.c b/tests/benchmark/test_urcu_lfs_rcu.c index 69da6b4..a26460a 100644 --- a/tests/benchmark/test_urcu_lfs_rcu.c +++ b/tests/benchmark/test_urcu_lfs_rcu.c @@ -138,6 +138,7 @@ struct test { static struct cds_lfs_stack_rcu s; +static void *thr_enqueuer(void *_count) { unsigned long long *count = _count; @@ -192,6 +193,7 @@ void free_node_cb(struct rcu_head *head) free(node); } +static void *thr_dequeuer(void *_count) { unsigned long long *count = _count; @@ -240,6 +242,7 @@ void *thr_dequeuer(void *_count) return ((void*)2); } +static void test_end(struct cds_lfs_stack_rcu *s, unsigned long long *nr_dequeues) { struct cds_lfs_node_rcu *snode; @@ -256,6 +259,7 @@ void test_end(struct cds_lfs_stack_rcu *s, unsigned long long *nr_dequeues) } while (snode); } +static void show_usage(int argc, char **argv) { printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) \n", diff --git a/tests/benchmark/test_urcu_qsbr.c b/tests/benchmark/test_urcu_qsbr.c index aceb527..f2f3b76 100644 --- a/tests/benchmark/test_urcu_qsbr.c +++ b/tests/benchmark/test_urcu_qsbr.c @@ -127,27 +127,7 @@ static unsigned int nr_writers; pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER; -void rcu_copy_mutex_lock(void) -{ - int ret; - ret = pthread_mutex_lock(&rcu_copy_mutex); - if (ret) { - perror("Error in pthread mutex lock"); - exit(-1); - } -} - -void rcu_copy_mutex_unlock(void) -{ - int ret; - - ret = pthread_mutex_unlock(&rcu_copy_mutex); - if (ret) { - perror("Error in pthread mutex unlock"); - exit(-1); - } -} - +static void *thr_reader(void *_count) { unsigned long long *count = _count; @@ -201,6 +181,7 @@ void *thr_reader(void *_count) } +static void *thr_writer(void *_count) { unsigned long long *count = _count; @@ -240,6 +221,7 @@ void *thr_writer(void *_count) return ((void*)2); } +static void show_usage(int argc, char **argv) { printf("Usage : %s nr_readers nr_writers duration (s) \n", diff --git a/tests/benchmark/test_urcu_qsbr_gc.c b/tests/benchmark/test_urcu_qsbr_gc.c index 2ec602a..eacdf2e 100644 --- a/tests/benchmark/test_urcu_qsbr_gc.c +++ b/tests/benchmark/test_urcu_qsbr_gc.c @@ -141,28 +141,7 @@ pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER; static unsigned long long __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *tot_nr_writes; - -void rcu_copy_mutex_lock(void) -{ - int ret; - ret = pthread_mutex_lock(&rcu_copy_mutex); - if (ret) { - perror("Error in pthread mutex lock"); - exit(-1); - } -} - -void rcu_copy_mutex_unlock(void) -{ - int ret; - - ret = pthread_mutex_unlock(&rcu_copy_mutex); - if (ret) { - perror("Error in pthread mutex unlock"); - exit(-1); - } -} - +static void *thr_reader(void *_count) { unsigned long long *count = _count; @@ -237,6 +216,7 @@ static void rcu_gc_reclaim(unsigned long wtidx, void *old) rcu_gc_clear_queue(wtidx); } +static void *thr_writer(void *data) { unsigned long wtidx = (unsigned long)data; @@ -278,6 +258,7 @@ void *thr_writer(void *data) return ((void*)2); } +static void show_usage(int argc, char **argv) { printf("Usage : %s nr_readers nr_writers duration (s) \n", diff --git a/tests/benchmark/test_urcu_qsbr_timing.c b/tests/benchmark/test_urcu_qsbr_timing.c index 75e6faa..71d8d8d 100644 --- a/tests/benchmark/test_urcu_qsbr_timing.c +++ b/tests/benchmark/test_urcu_qsbr_timing.c @@ -39,6 +39,7 @@ pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER; +static void rcu_copy_mutex_lock(void) { int ret; @@ -49,6 +50,7 @@ void rcu_copy_mutex_lock(void) } } +static void rcu_copy_mutex_unlock(void) { int ret; @@ -83,6 +85,7 @@ static int num_write; static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *reader_time; static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *writer_time; +static void *thr_reader(void *arg) { unsigned int i, j; @@ -120,6 +123,7 @@ void *thr_reader(void *arg) } +static void *thr_writer(void *arg) { unsigned int i, j; diff --git a/tests/benchmark/test_urcu_timing.c b/tests/benchmark/test_urcu_timing.c index b5f3e4a..44911f5 100644 --- a/tests/benchmark/test_urcu_timing.c +++ b/tests/benchmark/test_urcu_timing.c @@ -39,6 +39,7 @@ pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER; +static void rcu_copy_mutex_lock(void) { int ret; @@ -49,6 +50,7 @@ void rcu_copy_mutex_lock(void) } } +static void rcu_copy_mutex_unlock(void) { int ret; @@ -83,6 +85,7 @@ static int num_write; static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *reader_time; static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *writer_time; +static void *thr_reader(void *arg) { unsigned int i, j; @@ -119,6 +122,7 @@ void *thr_reader(void *arg) } +static void *thr_writer(void *arg) { unsigned int i, j; diff --git a/tests/benchmark/test_urcu_wfq.c b/tests/benchmark/test_urcu_wfq.c index 79ff716..c68a453 100644 --- a/tests/benchmark/test_urcu_wfq.c +++ b/tests/benchmark/test_urcu_wfq.c @@ -133,6 +133,7 @@ static unsigned int nr_dequeuers; static struct cds_wfq_queue q; +static void *thr_enqueuer(void *_count) { unsigned long long *count = _count; @@ -174,6 +175,7 @@ fail: } +static void *thr_dequeuer(void *_count) { unsigned long long *count = _count; @@ -213,6 +215,7 @@ void *thr_dequeuer(void *_count) return ((void*)2); } +static void test_end(struct cds_wfq_queue *q, unsigned long long *nr_dequeues) { struct cds_wfq_node *node; @@ -226,6 +229,7 @@ void test_end(struct cds_wfq_queue *q, unsigned long long *nr_dequeues) } while (node); } +static void show_usage(int argc, char **argv) { printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) \n", diff --git a/tests/common/api.h b/tests/common/api.h index 5ca045c..67c388e 100644 --- a/tests/common/api.h +++ b/tests/common/api.h @@ -243,6 +243,7 @@ static void run_on(int cpu) * timekeeping -- very crude -- should use MONOTONIC... */ +static inline long long get_microseconds(void) { struct timeval tv; diff --git a/tests/regression/rcutorture.h b/tests/regression/rcutorture.h index 9a2f9a1..46a6737 100644 --- a/tests/regression/rcutorture.h +++ b/tests/regression/rcutorture.h @@ -128,6 +128,7 @@ volatile int goflag __attribute__((__aligned__(CAA_CACHE_LINE_SIZE))) * Performance test. */ +static void *rcu_read_perf_test(void *arg) { int i; @@ -158,6 +159,7 @@ void *rcu_read_perf_test(void *arg) return (NULL); } +static void *rcu_update_perf_test(void *arg) { long long n_updates_local = 0; @@ -189,6 +191,7 @@ void *rcu_update_perf_test(void *arg) return NULL; } +static void perftestinit(void) { init_per_thread(n_reads_pt, 0LL); @@ -196,6 +199,7 @@ void perftestinit(void) uatomic_set(&nthreadsrunning, 0); } +static int perftestrun(int nthreads, int nreaders, int nupdaters) { int t; @@ -229,6 +233,7 @@ int perftestrun(int nthreads, int nreaders, int nupdaters) return 0; } +static int perftest(int nreaders, int cpustride) { int i; @@ -244,6 +249,7 @@ int perftest(int nreaders, int cpustride) return perftestrun(i + 1, nreaders, 1); } +static int rperftest(int nreaders, int cpustride) { int i; @@ -258,6 +264,7 @@ int rperftest(int nreaders, int cpustride) return perftestrun(i, nreaders, 0); } +static int uperftest(int nupdaters, int cpustride) { int i; @@ -292,6 +299,7 @@ DEFINE_PER_THREAD(long long [RCU_STRESS_PIPE_LEN + 1], rcu_stress_count); int garbage = 0; +static void *rcu_read_stress_test(void *arg) { int i; @@ -335,6 +343,7 @@ void *rcu_read_stress_test(void *arg) static pthread_mutex_t call_rcu_test_mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t call_rcu_test_cond = PTHREAD_COND_INITIALIZER; +static void rcu_update_stress_test_rcu(struct rcu_head *head) { int ret; @@ -362,6 +371,7 @@ void rcu_update_stress_test_rcu(struct rcu_head *head) } } +static void *rcu_update_stress_test(void *arg) { int i; @@ -435,6 +445,7 @@ void *rcu_update_stress_test(void *arg) return NULL; } +static void *rcu_fake_update_stress_test(void *arg) { if (callrcu_type == CALLRCU_PERTHREAD) { @@ -462,6 +473,7 @@ void *rcu_fake_update_stress_test(void *arg) return NULL; } +static int stresstest(int nreaders) { int i; @@ -519,6 +531,7 @@ int stresstest(int nreaders) * Mainprogram. */ +static void usage(int argc, char *argv[]) { diag("Usage: %s nreaders [ perf | rperf | uperf | stress ] [ stride ] [ callrcu_global | callrcu_percpu | callrcu_perthread ]\n", argv[0]);