projects
/
urcu.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)
[urcu.git]
/
doc
/
examples
/
wfcqueue
/
cds_wfcq_enqueue.c
diff --git
a/doc/examples/wfcqueue/cds_wfcq_enqueue.c
b/doc/examples/wfcqueue/cds_wfcq_enqueue.c
index b5dc1471f6bbcc109d300be81a3254456044ab3d..850eea8b5e5fa817fe8ef902d4f2144000b7c48c 100644
(file)
--- a/
doc/examples/wfcqueue/cds_wfcq_enqueue.c
+++ b/
doc/examples/wfcqueue/cds_wfcq_enqueue.c
@@
-27,7
+27,7
@@
struct mynode {
struct cds_wfcq_node node; /* Chaining in queue */
};
struct cds_wfcq_node node; /* Chaining in queue */
};
-int main(
int argc, char **argv
)
+int main(
void
)
{
int values[] = { -5, 42, 36, 24, };
struct cds_wfcq_head myqueue_head; /* Queue head */
{
int values[] = { -5, 42, 36, 24, };
struct cds_wfcq_head myqueue_head; /* Queue head */
@@
-39,8
+39,7
@@
int main(int argc, char **argv)
cds_wfcq_init(&myqueue_head, &myqueue_tail);
/*
cds_wfcq_init(&myqueue_head, &myqueue_tail);
/*
- * Adding nodes to the linked-list. Safe against concurrent
- * RCU traversals, require mutual exclusion with list updates.
+ * Enqueue nodes.
*/
for (i = 0; i < CAA_ARRAY_SIZE(values); i++) {
struct mynode *node;
*/
for (i = 0; i < CAA_ARRAY_SIZE(values); i++) {
struct mynode *node;
@@
-58,7
+57,8
@@
int main(int argc, char **argv)
}
/*
}
/*
- * Show the queue content.
+ * Show the queue content, iterate in the same order nodes were
+ * enqueued, from oldest to newest.
*/
printf("myqueue content:");
__cds_wfcq_for_each_blocking(&myqueue_head, &myqueue_tail, qnode) {
*/
printf("myqueue content:");
__cds_wfcq_for_each_blocking(&myqueue_head, &myqueue_tail, qnode) {
@@
-68,5
+68,6
@@
int main(int argc, char **argv)
}
printf("\n");
end:
}
printf("\n");
end:
+ cds_wfcq_destroy(&myqueue_head, &myqueue_tail);
return ret;
}
return ret;
}
This page took
0.024377 seconds
and
4
git commands to generate.