aboutsummaryrefslogtreecommitdiff
path: root/monitor
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-03-03 14:37:51 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2023-06-06 09:42:14 +0200
commit06831001ac8949b0801e0d20c347d97339769a20 (patch)
tree01c418078a78ff8049bf5eb7bc36cf3e3bddcb14 /monitor
parent09a49afeae2542993d4cdc5d7af22abdfce7a3ba (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 'monitor')
-rw-r--r--monitor/qmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/monitor/qmp.c b/monitor/qmp.c
index c8e0156974..6eee450fe4 100644
--- a/monitor/qmp.c
+++ b/monitor/qmp.c
@@ -246,7 +246,7 @@ static QMPRequest *monitor_qmp_dispatcher_pop_any(void)
*
* Clear qmp_dispatcher_co_busy before reading request.
*/
- qatomic_mb_set(&qmp_dispatcher_co_busy, false);
+ qatomic_set_mb(&qmp_dispatcher_co_busy, false);
WITH_QEMU_LOCK_GUARD(&monitor_lock) {
QMPRequest *req_obj;