[PULL 11/20] Docs/RCU: Correct sample code of qatomic_rcu_set

Paolo Bonzini posted 20 patches 5 years ago
Maintainers: Laurent Vivier <lvivier@redhat.com>, Thomas Huth <thuth@redhat.com>, Cleber Rosa <crosa@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Christian Schoenebeck <qemu_oss@crudebyte.com>, Gerd Hoffmann <kraxel@redhat.com>, Fam Zheng <fam@euphon.net>, "Daniel P. Berrangé" <berrange@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Max Reitz <mreitz@redhat.com>, Li-Wen Hsu <lwhsu@freebsd.org>, Sunil Muthuswamy <sunilmut@microsoft.com>, Richard Henderson <richard.henderson@linaro.org>, Ed Maste <emaste@freebsd.org>, Greg Kurz <groug@kaod.org>, Eduardo Habkost <ehabkost@redhat.com>
[PULL 11/20] Docs/RCU: Correct sample code of qatomic_rcu_set
Posted by Paolo Bonzini 5 years ago
From: Keqian Zhu <zhukeqian1@huawei.com>

Correct sample code to avoid confusing readers.

Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Cc: qemu-trivial@nongnu.org
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: <20210106071710.15836-1-zhukeqian1@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.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.29.2