projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cleanup: all functions have declarations (-Wmissing-prototypes)
[urcu.git]
/
tests
/
benchmark
/
test_urcu_assign.c
diff --git
a/tests/benchmark/test_urcu_assign.c
b/tests/benchmark/test_urcu_assign.c
index eaa04b32e416e2ee20ad276d029e0544bf1ef31f..a7189a7bbf0d641f5bc40488a009f5543db1aa57 100644
(file)
--- a/
tests/benchmark/test_urcu_assign.c
+++ b/
tests/benchmark/test_urcu_assign.c
@@
-33,7
+33,6
@@
#include <urcu/arch.h>
#include <urcu/tls-compat.h>
#include <urcu/arch.h>
#include <urcu/tls-compat.h>
-#include "cpuset.h"
#include "thread-id.h"
#include "../common/debug-yield.h"
#include "thread-id.h"
#include "../common/debug-yield.h"
@@
-108,11
+107,7
@@
static void set_affinity(void)
CPU_ZERO(&mask);
CPU_SET(cpu, &mask);
CPU_ZERO(&mask);
CPU_SET(cpu, &mask);
-#if SCHED_SETAFFINITY_ARGS == 2
- sched_setaffinity(0, &mask);
-#else
sched_setaffinity(0, sizeof(mask), &mask);
sched_setaffinity(0, sizeof(mask), &mask);
-#endif
#endif /* HAVE_SCHED_SETAFFINITY */
}
#endif /* HAVE_SCHED_SETAFFINITY */
}
@@
-137,6
+132,7
@@
static unsigned int nr_writers;
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
+static
void rcu_copy_mutex_lock(void)
{
int ret;
void rcu_copy_mutex_lock(void)
{
int ret;
@@
-147,6
+143,7
@@
void rcu_copy_mutex_lock(void)
}
}
}
}
+static
void rcu_copy_mutex_unlock(void)
{
int ret;
void rcu_copy_mutex_unlock(void)
{
int ret;
@@
-191,6
+188,7
@@
static void test_array_free(struct test_array *ptr)
ptr->a = ARRAY_POISON;
}
ptr->a = ARRAY_POISON;
}
+static
void *thr_reader(void *_count)
{
unsigned long long *count = _count;
void *thr_reader(void *_count)
{
unsigned long long *count = _count;
@@
-231,6
+229,7
@@
void *thr_reader(void *_count)
}
}
+static
void *thr_writer(void *_count)
{
unsigned long long *count = _count;
void *thr_writer(void *_count)
{
unsigned long long *count = _count;
@@
-272,6
+271,7
@@
void *thr_writer(void *_count)
return ((void*)2);
}
return ((void*)2);
}
+static
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
This page took
0.023217 seconds
and
4
git commands to generate.