Kick io-thread on qemu_chr_accept_input
authorJan Kiszka <jan.kiszka@siemens.com>
Fri, 16 Mar 2012 12:18:00 +0000 (13:18 +0100)
committerJan Kiszka <jan.kiszka@siemens.com>
Mon, 16 Apr 2012 13:41:31 +0000 (15:41 +0200)
Once a chr frontend is able to receive input again, we need to inform
the io-thread about this fact. Otherwise, main_loop_wait may continue to
select without the related backend file descriptor in its set. This can
cause high input latencies if only low-rate events arrive otherwise.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
qemu-char.c

index bb9e3f5..74c60e1 100644 (file)
@@ -177,6 +177,7 @@ void qemu_chr_accept_input(CharDriverState *s)
 {
     if (s->chr_accept_input)
         s->chr_accept_input(s);
+    qemu_notify_event();
 }
 
 void qemu_chr_fe_printf(CharDriverState *s, const char *fmt, ...)