Skip to contentSkip to conversation

Docs/RCU: Correct sample code of qatomic_rcu_set

PATCH Applied Keqian Zhu 3 participants 3 messages Jan 6, 2021 – Jan 7, 2021

lore
Share & tools
lore

Keqian Zhu

author
#0 lore raw

PATCH v2 1/1 Docs/RCU: Correct sample code of qatomic_rcu_set

Correct sample code to avoid confusing readers.

---

v2:
- Add Cc and R-b.

---
 docs/devel/rcu.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
docs/devel/rcu.txt +1 -1
index cdf002edd8..2e6cc607a1 100644
@@ -392,7 +392,7 @@ Instead, we store the size of the array with the array itself:
 
             /* Removal phase.  */
             old_array = global_array;
-            qatomic_rcu_set(&new_array->data, new_array);
+            qatomic_rcu_set(&global_array, new_array);
             synchronize_rcu();
 
             /* Reclamation phase.  */
Signature · 1 line
2.19.1
#2 lore raw
In reply to Keqian Zhu
Quoted 21 lines · Keqian Zhu

Correct sample code to avoid confusing readers.

---

v2:
- Add Cc and R-b.

---
  docs/devel/rcu.txt | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
docs/devel/rcu.txt +0 -0
index cdf002edd8..2e6cc607a1 100644

docs/devel/rcu.txt Instead, we store the size of the array with the array itself: · line 398

Quoted 8 lines
docs/devel/rcu.txt +1 -1
@@ -392,7 +392,7 @@ Instead, we store the size of the array with the array itself:
 
              /* Removal phase.  */
              old_array = global_array;
-            qatomic_rcu_set(&new_array->data, new_array);
+            qatomic_rcu_set(&global_array, new_array);
              synchronize_rcu();
 
              /* Reclamation phase.  */

Queued, thanks.

Paolo