doc/examples: document call_rcu()
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 22 Jun 2013 18:05:10 +0000 (14:05 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 22 Jun 2013 18:05:10 +0000 (14:05 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
doc/examples/urcu-flavors/mb.c
doc/examples/urcu-flavors/qsbr.c
doc/examples/urcu-flavors/signal.c

index 24daaef75c5735580457476408a1e3424478b3a4..757fe9e0a7e3acae21bab6b59300a88c2f34d83d 100644 (file)
@@ -108,6 +108,12 @@ int main(int argc, char **argv)
         */
        cds_list_for_each_entry_safe(node, n, &mylist, node) {
                cds_list_del_rcu(&node->node);
+               /*
+                * call_rcu() will ensure that the handler
+                * "rcu_free_node" is executed after a grace period.
+                * call_rcu() can be called from RCU read-side critical
+                * sections.
+                */
                call_rcu(&node->rcu_head, rcu_free_node);
        }
 
index 75302f0d31cf035afe2036039210fc3cb90fdf71..6f5b9b51d46b796adcaf26792dcfcfd5eb1b1c4f 100644 (file)
@@ -98,6 +98,12 @@ int main(int argc, char **argv)
         */
        cds_list_for_each_entry_safe(node, n, &mylist, node) {
                cds_list_del_rcu(&node->node);
+               /*
+                * call_rcu() will ensure that the handler
+                * "rcu_free_node" is executed after a grace period.
+                * call_rcu() can be called from RCU read-side critical
+                * sections.
+                */
                call_rcu(&node->rcu_head, rcu_free_node);
        }
 
index 53bb57f9b6780bbeea2d8e584d5905ba86137636..b7c279c9157732cbb4084ec1c2b041be2958a368 100644 (file)
@@ -107,6 +107,12 @@ int main(int argc, char **argv)
         */
        cds_list_for_each_entry_safe(node, n, &mylist, node) {
                cds_list_del_rcu(&node->node);
+               /*
+                * call_rcu() will ensure that the handler
+                * "rcu_free_node" is executed after a grace period.
+                * call_rcu() can be called from RCU read-side critical
+                * sections.
+                */
                call_rcu(&node->rcu_head, rcu_free_node);
        }
 
This page took 0.026325 seconds and 4 git commands to generate.