On 5/26/23 01:18, Paolo Bonzini wrote:
qatomic_mb_read and qatomic_mb_set were the very first atomic primitives
introduced for QEMU; their semantics are unclear and they provide a false
sense of safety.

The last use of qatomic_mb_read() has been removed, so delete it.
qatomic_mb_set() instead can survive as an optimized
qatomic_set()+smp_mb(), similar to Linux's smp_store_mb(), but
rename it to qatomic_set_mb() to match the order of the two
operations.

Signed-off-by: Paolo Bonzini<[email protected]>
---
  accel/tcg/cpu-exec.c              |  2 +-
  accel/tcg/tcg-accel-ops-mttcg.c   |  2 +-
  accel/tcg/tcg-accel-ops-rr.c      |  4 ++--
  docs/devel/atomics.rst            | 27 ++++-----------------------
  include/qemu/atomic.h             |  4 ++--
  monitor/qmp.c                     |  2 +-
  softmmu/cpus.c                    |  2 +-
  softmmu/physmem.c                 |  2 +-
  target/arm/hvf/hvf.c              |  2 +-
  tests/unit/test-aio-multithread.c |  2 +-
  util/qemu-coroutine-lock.c        |  4 ++--
  11 files changed, 17 insertions(+), 36 deletions(-)

Reviewed-by: Richard Henderson <[email protected]>

r~

Reply via email to