Browse Source

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>
pull/109/head
Keqian Zhu 6 years ago
committed by Paolo Bonzini
parent
commit
d533d6359b
  1. 2
      docs/devel/rcu.txt

2
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. */

Loading…
Cancel
Save