diff options
-rw-r--r-- | include/qemu/main-loop.h | 5 | ||||
-rw-r--r-- | main-loop.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h index 09952885a9..6f0200a7ac 100644 --- a/include/qemu/main-loop.h +++ b/include/qemu/main-loop.h @@ -82,6 +82,11 @@ int qemu_init_main_loop(void); int main_loop_wait(int nonblocking); /** + * qemu_get_aio_context: Return the main loop's AioContext + */ +AioContext *qemu_get_aio_context(void); + +/** * qemu_notify_event: Force processing of pending events. * * Similar to signaling a condition variable, qemu_notify_event forces diff --git a/main-loop.c b/main-loop.c index 8c9b58c14c..eb80ff369f 100644 --- a/main-loop.c +++ b/main-loop.c @@ -109,6 +109,11 @@ static int qemu_signal_init(void) static AioContext *qemu_aio_context; +AioContext *qemu_get_aio_context(void) +{ + return qemu_aio_context; +} + void qemu_notify_event(void) { if (!qemu_aio_context) { |