qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Use SIGIO with caution
@ 2011-05-29 21:50 Andreas Färber
  2011-05-31 13:47 ` Anthony Liguori
  0 siblings, 1 reply; 15+ messages in thread
From: Andreas Färber @ 2011-05-29 21:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Andreas Färber

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 <andreas.faerber@web.de>
---
 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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-06-01 22:30 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-29 21:50 [Qemu-devel] [PATCH] Use SIGIO with caution Andreas Färber
2011-05-31 13:47 ` Anthony Liguori
2011-05-31 14:06   ` Jan Kiszka
2011-05-31 14:26     ` Anthony Liguori
2011-05-31 14:54       ` Jan Kiszka
2011-05-31 15:44         ` Alexander Graf
2011-05-31 15:48           ` Anthony Liguori
2011-05-31 16:16             ` Alexander Graf
2011-05-31 19:49               ` Anthony Liguori
2011-05-31 21:11                 ` Andreas Färber
2011-05-31 21:43                   ` Jan Kiszka
2011-05-31 23:19                     ` Anthony Liguori
2011-05-31 14:11   ` Avi Kivity
2011-05-31 21:24   ` Andreas Färber
2011-06-01 22:30   ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).