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.12.3~22 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e3717dbc8700ef1db5d341e2c5a74f61c4981ab3;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 51972c8..2385f89 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 19eb7c4..d855b49 100644 --- a/tests/benchmark/test_mutex.c +++ b/tests/benchmark/test_mutex.c @@ -142,27 +142,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; @@ -197,6 +177,7 @@ void *thr_reader(void *data) } +static void *thr_writer(void *data) { unsigned long wtidx = (unsigned long)data; @@ -231,6 +212,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 f02e00b..a4b1745 100644 --- a/tests/benchmark/test_perthreadlock.c +++ b/tests/benchmark/test_perthreadlock.c @@ -170,6 +170,7 @@ static void urcu_mutex_unlock(pthread_mutex_t *lock) } } +static void *thr_reader(void *data) { unsigned long tidx = (unsigned long)data; @@ -204,6 +205,7 @@ void *thr_reader(void *data) } +static void *thr_writer(void *data) { unsigned long wtidx = (unsigned long)data; @@ -243,6 +245,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 4628080..284ddf1 100644 --- a/tests/benchmark/test_rwlock.c +++ b/tests/benchmark/test_rwlock.c @@ -142,27 +142,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; @@ -209,6 +189,7 @@ void *thr_reader(void *_count) } +static void *thr_writer(void *_count) { unsigned long long *count = _count; @@ -256,6 +237,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 24758a7..ff718fe 100644 --- a/tests/benchmark/test_urcu.c +++ b/tests/benchmark/test_urcu.c @@ -133,27 +133,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; @@ -200,6 +180,7 @@ void *thr_reader(void *_count) } +static void *thr_writer(void *_count) { unsigned long long *count = _count; @@ -239,6 +220,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 eaa04b3..758165e 100644 --- a/tests/benchmark/test_urcu_assign.c +++ b/tests/benchmark/test_urcu_assign.c @@ -137,6 +137,7 @@ static unsigned int nr_writers; pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER; +static void rcu_copy_mutex_lock(void) { int ret; @@ -147,6 +148,7 @@ void rcu_copy_mutex_lock(void) } } +static void rcu_copy_mutex_unlock(void) { int ret; @@ -191,6 +193,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; @@ -231,6 +234,7 @@ void *thr_reader(void *_count) } +static void *thr_writer(void *_count) { unsigned long long *count = _count; @@ -272,6 +276,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 86b0b02..0da2717 100644 --- a/tests/benchmark/test_urcu_bp.c +++ b/tests/benchmark/test_urcu_bp.c @@ -133,27 +133,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; @@ -196,6 +176,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_defer.c b/tests/benchmark/test_urcu_defer.c index df8e335..18a321d 100644 --- a/tests/benchmark/test_urcu_defer.c +++ b/tests/benchmark/test_urcu_defer.c @@ -141,27 +141,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; @@ -210,6 +190,7 @@ static void test_cb1(void *data) { } +static void *thr_writer(void *data) { unsigned long wtidx = (unsigned long)data; @@ -261,6 +242,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 34cf141..15482cb 100644 --- a/tests/benchmark/test_urcu_gc.c +++ b/tests/benchmark/test_urcu_gc.c @@ -149,27 +149,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; @@ -241,6 +221,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; @@ -282,6 +263,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 376f3b1..896fb32 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; @@ -198,6 +203,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", @@ -263,6 +269,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 26247b5..26b1813 100644 --- a/tests/benchmark/test_urcu_lfq.c +++ b/tests/benchmark/test_urcu_lfq.c @@ -139,6 +139,7 @@ struct test { static struct cds_lfq_queue_rcu q; +static void *thr_enqueuer(void *_count) { unsigned long long *count = _count; @@ -194,6 +195,7 @@ void free_node_cb(struct rcu_head *head) free(node); } +static void *thr_dequeuer(void *_count) { unsigned long long *count = _count; @@ -243,6 +245,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; @@ -259,6 +262,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 d0e80db..d700b87 100644 --- a/tests/benchmark/test_urcu_lfs_rcu.c +++ b/tests/benchmark/test_urcu_lfs_rcu.c @@ -143,6 +143,7 @@ struct test { static struct cds_lfs_stack_rcu s; +static void *thr_enqueuer(void *_count) { unsigned long long *count = _count; @@ -197,6 +198,7 @@ void free_node_cb(struct rcu_head *head) free(node); } +static void *thr_dequeuer(void *_count) { unsigned long long *count = _count; @@ -245,6 +247,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; @@ -261,6 +264,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 962476c..52cec27 100644 --- a/tests/benchmark/test_urcu_qsbr.c +++ b/tests/benchmark/test_urcu_qsbr.c @@ -132,27 +132,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; @@ -206,6 +186,7 @@ void *thr_reader(void *_count) } +static void *thr_writer(void *_count) { unsigned long long *count = _count; @@ -245,6 +226,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 26bc352..5910323 100644 --- a/tests/benchmark/test_urcu_qsbr_gc.c +++ b/tests/benchmark/test_urcu_qsbr_gc.c @@ -146,28 +146,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; @@ -242,6 +221,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; @@ -283,6 +263,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 7682104..07a6848 100644 --- a/tests/benchmark/test_urcu_wfq.c +++ b/tests/benchmark/test_urcu_wfq.c @@ -138,6 +138,7 @@ static unsigned int nr_dequeuers; static struct cds_wfq_queue q; +static void *thr_enqueuer(void *_count) { unsigned long long *count = _count; @@ -179,6 +180,7 @@ fail: } +static void *thr_dequeuer(void *_count) { unsigned long long *count = _count; @@ -218,6 +220,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; @@ -231,6 +234,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 35a8037..3737d4b 100644 --- a/tests/common/api.h +++ b/tests/common/api.h @@ -248,6 +248,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]);