mirror of
https://github.com/qemu/qemu.git
synced 2024-11-29 14:53:35 +08:00
Docs/RCU: Correct sample code of qatomic_rcu_set
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>
This commit is contained in:
parent
b9a0de3773
commit
d533d6359b
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user