iohandler: Introduce iohandler_get_aio_context
authorFam Zheng <famz@redhat.com>
Fri, 22 Apr 2016 13:53:52 +0000 (21:53 +0800)
committerKevin Wolf <kwolf@redhat.com>
Fri, 22 Apr 2016 14:43:42 +0000 (16:43 +0200)
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
include/qemu/main-loop.h
iohandler.c
stubs/Makefile.objs
stubs/iohandler.c [new file with mode: 0644]

index 99769093fc74876ba72af54a6b5b548fbf3efdfd..19b5de3dd5668fa2a48ed469c69a35233883c4d2 100644 (file)
@@ -204,6 +204,7 @@ void qemu_set_fd_handler(int fd,
                          void *opaque);
 
 GSource *iohandler_get_g_source(void);
+AioContext *iohandler_get_aio_context(void);
 #ifdef CONFIG_POSIX
 /**
  * qemu_add_child_watch: Register a child process for reaping.
index 3f23433b5a901efc26afa85d2e877dbd169e4215..f2fc8a9bd6c02645cf3276bf23e0fbc0516a2f7e 100644 (file)
@@ -44,6 +44,12 @@ static void iohandler_init(void)
     }
 }
 
+AioContext *iohandler_get_aio_context(void)
+{
+    iohandler_init();
+    return iohandler_ctx;
+}
+
 GSource *iohandler_get_g_source(void)
 {
     iohandler_init();
index b6d1e650db934a685ebdacfe03ea19a9d0768c97..4b258a673145f3469690e1224833e487cb79b454 100644 (file)
@@ -40,3 +40,4 @@ stub-obj-y += qmp_pc_dimm_device_list.o
 stub-obj-y += target-monitor-defs.o
 stub-obj-y += target-get-monitor-def.o
 stub-obj-y += vhost.o
+stub-obj-y += iohandler.o
diff --git a/stubs/iohandler.c b/stubs/iohandler.c
new file mode 100644 (file)
index 0000000..22b0ee5
--- /dev/null
@@ -0,0 +1,8 @@
+#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "qemu/main-loop.h"
+
+AioContext *iohandler_get_aio_context(void)
+{
+    abort();
+}