summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/vl.c b/vl.c
index 7f8bd39c70..3650f4fb74 100644
--- a/vl.c
+++ b/vl.c
@@ -1745,9 +1745,7 @@ int qemu_reset_requested_get(void)
static int qemu_shutdown_requested(void)
{
- int r = shutdown_requested;
- shutdown_requested = 0;
- return r;
+ return atomic_xchg(&shutdown_requested, 0);
}
static void qemu_kill_report(void)