X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=doc%2Fexamples%2Flist%2Fcds_list_replace_rcu.c;h=aa6161c25810d57db5947244e897ad6927f377f1;hb=70469b43316ecc8d6053550504858ad8a8ef9b16;hp=4ccc1df0038e583be8ea57a2b30e420a78d5654f;hpb=7eba9f8868d01401bc9b09ab2764bd371b783ad1;p=urcu.git diff --git a/doc/examples/list/cds_list_replace_rcu.c b/doc/examples/list/cds_list_replace_rcu.c index 4ccc1df..aa6161c 100644 --- a/doc/examples/list/cds_list_replace_rcu.c +++ b/doc/examples/list/cds_list_replace_rcu.c @@ -16,7 +16,7 @@ #include -#include /* Userspace RCU flavor */ +#include /* Userspace RCU flavor */ #include /* RCU list */ #include /* For CAA_ARRAY_SIZE */ @@ -37,7 +37,7 @@ void free_node_rcu(struct rcu_head *head) free(node); } -int main(int argc, char **argv) +int main(void) { int values[] = { -5, 42, 36, 24, }; CDS_LIST_HEAD(mylist); /* Defines an empty list head */ @@ -77,7 +77,7 @@ int main(int argc, char **argv) /* Replacement node value is negated original value. */ new_node->value = -node->value; cds_list_replace_rcu(&node->node, &new_node->node); - call_rcu(&node->rcu_head, free_node_rcu); + urcu_memb_call_rcu(&node->rcu_head, free_node_rcu); } /*