cleanup: all functions have declarations (-Wmissing-prototypes)
[urcu.git] / tests / benchmark / test_urcu_defer.c
index df8e335ec898a396e6ed4958ac9e76e419a6038c..9f24de7cdac945c58c00029801bfb127ced684ef 100644 (file)
@@ -33,7 +33,6 @@
 
 #include <urcu/arch.h>
 #include <urcu/tls-compat.h>
-#include "cpuset.h"
 #include "thread-id.h"
 #include "../common/debug-yield.h"
 
@@ -109,11 +108,7 @@ static void set_affinity(void)
 
        CPU_ZERO(&mask);
        CPU_SET(cpu, &mask);
-#if SCHED_SETAFFINITY_ARGS == 2
-       sched_setaffinity(0, &mask);
-#else
        sched_setaffinity(0, sizeof(mask), &mask);
-#endif
 #endif /* HAVE_SCHED_SETAFFINITY */
 }
 
@@ -141,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;
@@ -210,6 +185,7 @@ static void test_cb1(void *data)
 {
 }
 
+static
 void *thr_writer(void *data)
 {
        unsigned long wtidx = (unsigned long)data;
@@ -261,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) <OPTIONS>\n",
This page took 0.023684 seconds and 4 git commands to generate.