From f3926945c85689e8af324c0db0b39be771dbbebb Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Mon, 7 Sep 2015 11:28:58 +0800 Subject: iohandler: Use aio API iohandler.c shares the same interface with aio, but with duplicated code. It's better to rebase iohandler, also because that aio is a more friendly interface to multi-threads. Create a global AioContext instance and let its GSource handle the iohandler events. Signed-off-by: Fam Zheng Message-Id: <1441596538-4412-1-git-send-email-famz@redhat.com> Signed-off-by: Paolo Bonzini --- include/qemu/main-loop.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/qemu') diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h index bc18ca3..9976909 100644 --- a/include/qemu/main-loop.h +++ b/include/qemu/main-loop.h @@ -203,6 +203,7 @@ void qemu_set_fd_handler(int fd, IOHandler *fd_write, void *opaque); +GSource *iohandler_get_g_source(void); #ifdef CONFIG_POSIX /** * qemu_add_child_watch: Register a child process for reaping. @@ -265,8 +266,6 @@ void qemu_mutex_unlock_iothread(void); /* internal interfaces */ void qemu_fd_register(int fd); -void qemu_iohandler_fill(GArray *pollfds); -void qemu_iohandler_poll(GArray *pollfds, int rc); QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque); void qemu_bh_schedule_idle(QEMUBH *bh); -- cgit v1.1