From: Keqian Zhu Date: Wed, 6 Jan 2021 07:17:10 +0000 (+0800) Subject: Docs/RCU: Correct sample code of qatomic_rcu_set X-Git-Tag: v6.0.0-rc0~151^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d533d6359b8015e2207bb7ca86330da2ef9c3ef8;p=thirdparty%2Fqemu.git Docs/RCU: Correct sample code of qatomic_rcu_set Correct sample code to avoid confusing readers. Signed-off-by: Keqian Zhu Cc: qemu-trivial@nongnu.org Reviewed-by: Paolo Bonzini Reviewed-by: Peter Xu Message-Id: <20210106071710.15836-1-zhukeqian1@huawei.com> Signed-off-by: Paolo Bonzini --- diff --git a/docs/devel/rcu.txt b/docs/devel/rcu.txt index cdf002edd82..2e6cc607a17 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. */