diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2023-03-03 13:46:03 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-05-08 11:10:48 +0200 |
commit | 6e288b00ef536f87910f76cb1940a8caced69c54 (patch) | |
tree | 709984e3e94a50b2f5ef989860199c6d08149514 /include | |
parent | 792f77f376adef944f9a03e601f6ad90c2f891b2 (diff) | |
download | qemu-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.h | 5 |
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(); } |