diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2023-03-03 14:37:51 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-06-06 09:42:14 +0200 |
commit | 06831001ac8949b0801e0d20c347d97339769a20 (patch) | |
tree | 01c418078a78ff8049bf5eb7bc36cf3e3bddcb14 /target/arm/hvf/hvf.c | |
parent | 09a49afeae2542993d4cdc5d7af22abdfce7a3ba (diff) |
atomics: eliminate mb_read/mb_set
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.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/arm/hvf/hvf.c')
-rw-r--r-- | target/arm/hvf/hvf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index ad65603445..5900dc788f 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1229,7 +1229,7 @@ static void hvf_wait_for_ipi(CPUState *cpu, struct timespec *ts) * Use pselect to sleep so that other threads can IPI us while we're * sleeping. */ - qatomic_mb_set(&cpu->thread_kicked, false); + qatomic_set_mb(&cpu->thread_kicked, false); qemu_mutex_unlock_iothread(); pselect(0, 0, 0, 0, ts, &cpu->hvf->unblock_ipi_mask); qemu_mutex_lock_iothread(); |