projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix: shadowed local variable (-Wshadow)
[urcu.git]
/
tests
/
benchmark
/
test_urcu_wfq.c
diff --git
a/tests/benchmark/test_urcu_wfq.c
b/tests/benchmark/test_urcu_wfq.c
index 79ff716c34f153ae66b9e1fe0cd5bc9fa6b35ad7..bc9e89fb9bb29601734892b4b1f3dea0a01f7c9d 100644
(file)
--- a/
tests/benchmark/test_urcu_wfq.c
+++ b/
tests/benchmark/test_urcu_wfq.c
@@
-133,6
+133,7
@@
static unsigned int nr_dequeuers;
static struct cds_wfq_queue q;
static struct cds_wfq_queue q;
+static
void *thr_enqueuer(void *_count)
{
unsigned long long *count = _count;
void *thr_enqueuer(void *_count)
{
unsigned long long *count = _count;
@@
-174,6
+175,7
@@
fail:
}
}
+static
void *thr_dequeuer(void *_count)
{
unsigned long long *count = _count;
void *thr_dequeuer(void *_count)
{
unsigned long long *count = _count;
@@
-213,19
+215,21
@@
void *thr_dequeuer(void *_count)
return ((void*)2);
}
return ((void*)2);
}
-void test_end(struct cds_wfq_queue *q, unsigned long long *nr_dequeues)
+static
+void test_end(unsigned long long *nr_dequeues_l)
{
struct cds_wfq_node *node;
do {
{
struct cds_wfq_node *node;
do {
- node = cds_wfq_dequeue_blocking(q);
+ node = cds_wfq_dequeue_blocking(
&
q);
if (node) {
free(node);
if (node) {
free(node);
- (*nr_dequeues)++;
+ (*nr_dequeues
_l
)++;
}
} while (node);
}
}
} while (node);
}
+static
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) <OPTIONS>\n",
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) <OPTIONS>\n",
@@
-366,7
+370,7
@@
int main(int argc, char **argv)
tot_successful_dequeues += count_dequeuer[2 * i_thr + 1];
}
tot_successful_dequeues += count_dequeuer[2 * i_thr + 1];
}
- test_end(&
q, &
end_dequeues);
+ test_end(&end_dequeues);
printf_verbose("total number of enqueues : %llu, dequeues %llu\n",
tot_enqueues, tot_dequeues);
printf_verbose("total number of enqueues : %llu, dequeues %llu\n",
tot_enqueues, tot_dequeues);
This page took
0.023786 seconds
and
4
git commands to generate.