aboutsummaryrefslogtreecommitdiff
path: root/include/qemu
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2013-03-07 13:41:44 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-03-15 16:07:50 +0100
commit5f3aa1ff4781f39e05b9892d58319a09fedc8918 (patch)
tree5ba40541b24dfde3d6b500c1080d068417f17d55 /include/qemu
parented9ba7246758e3250849bfa0a055b4eb98fc5152 (diff)
downloadqemu-5f3aa1ff4781f39e05b9892d58319a09fedc8918.zip
qemu-5f3aa1ff4781f39e05b9892d58319a09fedc8918.tar.gz
qemu-5f3aa1ff4781f39e05b9892d58319a09fedc8918.tar.bz2
main-loop: add qemu_get_aio_context()
It is very useful to get the main loop AioContext, which is a static variable in main-loop.c. I'm not sure whether qemu_get_aio_context() will be necessary in the future once devices focus on using their own AioContext instead of the main loop AioContext, but for now it allows us to refactor code to support multiple AioContext while actually passing the main loop AioContext. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qemu')
-rw-r--r--include/qemu/main-loop.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h
index 0995288..6f0200a 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