qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Docs/RCU: Correct sample code of qatomic_rcu_set
@ 2020-12-21 12:17 Keqian Zhu
  2020-12-21 13:25 ` Paolo Bonzini
  2020-12-21 15:29 ` Peter Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Keqian Zhu @ 2020-12-21 12:17 UTC (permalink / raw)
  To: Paolo Bonzini, Philippe Mathieu-Daudé, Stefan Hajnoczi
  Cc: Peter Maydell, Andrew Jones, Eduardo Habkost, qemu-devel,
	Peter Xu, qemu-arm, wanghaibin.wang, Keqian Zhu

Correct sample code to avoid confusing readers.

Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
---
 docs/devel/rcu.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/devel/rcu.txt b/docs/devel/rcu.txt
index cdf002edd8..2e6cc607a1 100644
--- a/docs/devel/rcu.txt
+++ b/docs/devel/rcu.txt
@@ -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.  */
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-21 15:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-21 12:17 [PATCH] Docs/RCU: Correct sample code of qatomic_rcu_set Keqian Zhu
2020-12-21 13:25 ` Paolo Bonzini
2020-12-21 15:29 ` Peter Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).