aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-03-03 13:46:03 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2023-05-08 11:10:48 +0200
commit6e288b00ef536f87910f76cb1940a8caced69c54 (patch)
tree709984e3e94a50b2f5ef989860199c6d08149514 /include
parent792f77f376adef944f9a03e601f6ad90c2f891b2 (diff)
downloadqemu-6e288b00ef536f87910f76cb1940a8caced69c54.zip
qemu-6e288b00ef536f87910f76cb1940a8caced69c54.tar.gz
qemu-6e288b00ef536f87910f76cb1940a8caced69c54.tar.bz2
rcu: remove qatomic_mb_set, expand comments
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/qemu/rcu.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/qemu/rcu.h b/include/qemu/rcu.h
index 313fc41..661c1a1 100644
--- a/include/qemu/rcu.h
+++ b/include/qemu/rcu.h
@@ -87,7 +87,10 @@ static inline void rcu_read_lock(void)
ctr = qatomic_read(&rcu_gp_ctr);
qatomic_set(&p_rcu_reader->ctr, ctr);
- /* Write p_rcu_reader->ctr before reading RCU-protected pointers. */
+ /*
+ * Read rcu_gp_ptr and write p_rcu_reader->ctr before reading
+ * RCU-protected pointers.
+ */
smp_mb_placeholder();
}