[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PATCH] Use SIGIO with caution
From: |
Andreas Färber |
Subject: |
[Qemu-trivial] [PATCH] Use SIGIO with caution |
Date: |
Sun, 29 May 2011 23:50:31 +0200 |
BeOS and Haiku don't define SIGIO. When undefined, it won't arrive
and doesn't need to be blocked.
Signed-off-by: Andreas Färber <address@hidden>
---
cpus.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/cpus.c b/cpus.c
index 1fc34b7..42af291 100644
--- a/cpus.c
+++ b/cpus.c
@@ -395,7 +395,9 @@ static int qemu_signal_init(void)
pthread_sigmask(SIG_UNBLOCK, &set, NULL);
sigemptyset(&set);
+#ifdef SIGIO
sigaddset(&set, SIGIO);
+#endif
sigaddset(&set, SIGALRM);
sigaddset(&set, SIG_IPI);
sigaddset(&set, SIGBUS);
@@ -408,7 +410,9 @@ static int qemu_signal_init(void)
* We need to process timer signals synchronously to avoid a race
* between exit_request check and KVM vcpu entry.
*/
+#ifdef SIGIO
sigaddset(&set, SIGIO);
+#endif
sigaddset(&set, SIGALRM);
}
#endif
@@ -449,12 +453,16 @@ static void qemu_kvm_init_cpu_signals(CPUState *env)
#else
sigemptyset(&set);
sigaddset(&set, SIG_IPI);
+#ifdef SIGIO
sigaddset(&set, SIGIO);
+#endif
sigaddset(&set, SIGALRM);
pthread_sigmask(SIG_BLOCK, &set, NULL);
pthread_sigmask(SIG_BLOCK, NULL, &set);
+#ifdef SIGIO
sigdelset(&set, SIGIO);
+#endif
sigdelset(&set, SIGALRM);
#endif
sigdelset(&set, SIG_IPI);
--
1.7.5.3
- [Qemu-trivial] [PATCH] Use SIGIO with caution,
Andreas Färber <=
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] Use SIGIO with caution, Anthony Liguori, 2011/05/31
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] Use SIGIO with caution, Jan Kiszka, 2011/05/31
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] Use SIGIO with caution, Anthony Liguori, 2011/05/31
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] Use SIGIO with caution, Jan Kiszka, 2011/05/31
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] Use SIGIO with caution, Alexander Graf, 2011/05/31
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] Use SIGIO with caution, Anthony Liguori, 2011/05/31
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] Use SIGIO with caution, Alexander Graf, 2011/05/31
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] Use SIGIO with caution, Anthony Liguori, 2011/05/31
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] Use SIGIO with caution, Andreas Färber, 2011/05/31
- Re: [Qemu-trivial] [PATCH] Use SIGIO with caution, Jan Kiszka, 2011/05/31