projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cleanup: explicitly mark unused parameters (-Wunused-parameter)
[userspace-rcu.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..9a0f266bec2dfaaef40032196b588ff2f75d3941 100644
(file)
--- 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;
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
+148,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
+193,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
+234,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,7
+276,8
@@
void *thr_writer(void *_count)
return ((void*)2);
}
return ((void*)2);
}
-void show_usage(int argc, char **argv)
+static
+void show_usage(char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
argv[0]);
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
argv[0]);
@@
-297,25
+302,25
@@
int main(int argc, char **argv)
unsigned int i_thr;
if (argc < 4) {
unsigned int i_thr;
if (argc < 4) {
- show_usage(arg
c, arg
v);
+ show_usage(argv);
return -1;
}
err = sscanf(argv[1], "%u", &nr_readers);
if (err != 1) {
return -1;
}
err = sscanf(argv[1], "%u", &nr_readers);
if (err != 1) {
- show_usage(arg
c, arg
v);
+ show_usage(argv);
return -1;
}
err = sscanf(argv[2], "%u", &nr_writers);
if (err != 1) {
return -1;
}
err = sscanf(argv[2], "%u", &nr_writers);
if (err != 1) {
- show_usage(arg
c, arg
v);
+ show_usage(argv);
return -1;
}
err = sscanf(argv[3], "%lu", &duration);
if (err != 1) {
return -1;
}
err = sscanf(argv[3], "%lu", &duration);
if (err != 1) {
- show_usage(arg
c, arg
v);
+ show_usage(argv);
return -1;
}
return -1;
}
@@
-331,7
+336,7
@@
int main(int argc, char **argv)
break;
case 'a':
if (argc < i + 2) {
break;
case 'a':
if (argc < i + 2) {
- show_usage(arg
c, arg
v);
+ show_usage(argv);
return -1;
}
a = atoi(argv[++i]);
return -1;
}
a = atoi(argv[++i]);
@@
-341,21
+346,21
@@
int main(int argc, char **argv)
break;
case 'c':
if (argc < i + 2) {
break;
case 'c':
if (argc < i + 2) {
- show_usage(arg
c, arg
v);
+ show_usage(argv);
return -1;
}
rduration = atol(argv[++i]);
break;
case 'd':
if (argc < i + 2) {
return -1;
}
rduration = atol(argv[++i]);
break;
case 'd':
if (argc < i + 2) {
- show_usage(arg
c, arg
v);
+ show_usage(argv);
return -1;
}
wdelay = atol(argv[++i]);
break;
case 'e':
if (argc < i + 2) {
return -1;
}
wdelay = atol(argv[++i]);
break;
case 'e':
if (argc < i + 2) {
- show_usage(arg
c, arg
v);
+ show_usage(argv);
return -1;
}
wduration = atol(argv[++i]);
return -1;
}
wduration = atol(argv[++i]);
This page took
0.023342 seconds
and
4
git commands to generate.