cleanup: all functions have declarations (-Wmissing-prototypes)
[userspace-rcu.git] / tests / benchmark / test_urcu_gc.c
index 1e50e4c5f4a369bed7f775cab7417cb872d743ea..15482cb26a69130dafe60e624efa75a7aaf20e48 100644 (file)
@@ -55,7 +55,7 @@ static unsigned long wdelay;
 
 static struct test_array *test_rcu_pointer;
 
-static unsigned int reclaim_batch = 1;
+static long reclaim_batch = 1;
 
 struct reclaim_queue {
        void **queue;   /* Beginning of queue */
@@ -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) <OPTIONS>\n",
@@ -449,7 +431,7 @@ int main(int argc, char **argv)
        printf("SUMMARY %-25s testdur %4lu nr_readers %3u rdur %6lu wdur %6lu "
                "nr_writers %3u "
                "wdelay %6lu nr_reads %12llu nr_writes %12llu nr_ops %12llu "
-               "batch %u\n",
+               "batch %ld\n",
                argv[0], duration, nr_readers, rduration, wduration,
                nr_writers, wdelay, tot_reads, tot_writes,
                tot_reads + tot_writes, reclaim_batch);
This page took 0.02503 seconds and 4 git commands to generate.