aboutsummaryrefslogtreecommitdiff
path: root/main-loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'main-loop.c')
-rw-r--r--main-loop.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/main-loop.c b/main-loop.c
index 82875a4dfd..39970437f8 100644
--- a/main-loop.c
+++ b/main-loop.c
@@ -114,6 +114,14 @@ static int qemu_signal_init(void)
#endif
static AioContext *qemu_aio_context;
+static QEMUBH *qemu_notify_bh;
+
+static void notify_event_cb(void *opaque)
+{
+ /* No need to do anything; this bottom half is only used to
+ * kick the kernel out of ppoll/poll/WaitForMultipleObjects.
+ */
+}
AioContext *qemu_get_aio_context(void)
{
@@ -125,7 +133,7 @@ void qemu_notify_event(void)
if (!qemu_aio_context) {
return;
}
- aio_notify(qemu_aio_context);
+ qemu_bh_schedule(qemu_notify_bh);
}
static GArray *gpollfds;
@@ -144,6 +152,7 @@ int qemu_init_main_loop(Error **errp)
}
qemu_aio_context = aio_context_new(&local_error);
+ qemu_notify_bh = qemu_bh_new(notify_event_cb, NULL);
if (!qemu_aio_context) {
error_propagate(errp, local_error);
return -EMFILE;