summaryrefslogtreecommitdiff
path: root/include/trace.h
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2014-10-27 14:05:10 +0000
committerMichael Roth <mdroth@linux.vnet.ibm.com>2015-01-06 18:25:45 -0600
commit5a6af9724369b321f0ae4459403ef76e4a7bd507 (patch)
tree18e1e702d64655f611073152f497c23859b77454 /include/trace.h
parent90de7a03bbc24d559971248c5530631d9bc27250 (diff)
downloadqemu-5a6af9724369b321f0ae4459403ef76e4a7bd507.tar.gz
Make qemu_shutdown_requested signal-safe
qemu_shutdown_requested may be interrupted by qemu_system_killed. If the latter sets shutdown_requested after qemu_shutdown_requested has read it but before it was cleared, the shutdown event is lost. Fix this by using atomic_xchg. This provides a different fix for the problem which commit 15124e142 attempts to deal with. That commit breaks use of ^C to drop into gdb, and so this approach is better (and 15124e142 can be reverted). Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> [PMM: commit message tweak] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> (cherry picked from commit 817ef04db2cfa2df04daffd6917f4ea7605f6403) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'include/trace.h')
0 files changed, 0 insertions, 0 deletions