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 2f81384726..f6b3546942 100644
--- a/vl.c
+++ b/vl.c
@@ -1609,9 +1609,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)