From 5444e768ee1abe6e021bece19a9a932351f88c88 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 13 May 2013 13:29:47 +0200 Subject: add a header file for atomic operations We're already using them in several places, but __sync builtins are just too ugly to type, and do not provide seqcst load/store operations. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- hw/display/qxl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/display') diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 3862d7a..ddefa06 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -23,6 +23,7 @@ #include "qemu-common.h" #include "qemu/timer.h" #include "qemu/queue.h" +#include "qemu/atomic.h" #include "monitor/monitor.h" #include "sysemu/sysemu.h" #include "trace.h" @@ -1726,7 +1727,7 @@ static void qxl_send_events(PCIQXLDevice *d, uint32_t events) trace_qxl_send_events_vm_stopped(d->id, events); return; } - old_pending = __sync_fetch_and_or(&d->ram->int_pending, le_events); + old_pending = atomic_fetch_or(&d->ram->int_pending, le_events); if ((old_pending & le_events) == le_events) { return; } -- cgit v1.1