X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=doc%2Fexamples%2Furcu-flavors%2Fbp.c;h=9032b9b98b7bb8072347d22760bfc75491890950;hb=70469b43316ecc8d6053550504858ad8a8ef9b16;hp=64978fcef2f8f305e3c4f72078f99b415d98fc25;hpb=9b4bf32b5757c99226eb78bea03f911536f2e9fc;p=urcu.git diff --git a/doc/examples/urcu-flavors/bp.c b/doc/examples/urcu-flavors/bp.c index 64978fc..9032b9b 100644 --- a/doc/examples/urcu-flavors/bp.c +++ b/doc/examples/urcu-flavors/bp.c @@ -22,7 +22,7 @@ #include #include -#include /* Bulletproof RCU flavor */ +#include /* Bulletproof RCU flavor */ #include /* List example */ #include /* For CAA_ARRAY_SIZE */ @@ -54,7 +54,7 @@ int add_node(uint64_t v) return 0; } -int main(int argc, char **argv) +int main(void) { uint64_t values[] = { 42, 36, 24, }; unsigned int i; @@ -81,7 +81,7 @@ int main(int argc, char **argv) * with rcu_read_lock() and rcu_read_unlock(). They can be * nested. Those are no-ops for the QSBR flavor. */ - rcu_read_lock(); + urcu_bp_read_lock(); /* * RCU traversal of the linked list. @@ -89,7 +89,7 @@ int main(int argc, char **argv) cds_list_for_each_entry_rcu(node, &mylist, node) { printf("Value: %" PRIu64 "\n", node->value); } - rcu_read_unlock(); + urcu_bp_read_unlock(); /* * Removing nodes from linked list. Safe against concurrent RCU @@ -104,7 +104,7 @@ int main(int argc, char **argv) * spawning any call_rcu() thread. It is slower though, * since there is no batching. */ - synchronize_rcu(); + urcu_bp_synchronize_rcu(); free(node); }