diff options
| author | Stefan Hajnoczi | 2016-12-01 20:26:41 +0100 |
|---|---|---|
| committer | Stefan Hajnoczi | 2017-01-03 17:38:48 +0100 |
| commit | f6a51c84cdc97e0178aab7690788d3891d2fcf0a (patch) | |
| tree | a3006871b448d1041d7a2716895070f1bb6afa17 /include/block | |
| parent | aio: add flag to skip fds to aio_dispatch() (diff) | |
| download | qemu-f6a51c84cdc97e0178aab7690788d3891d2fcf0a.tar.gz qemu-f6a51c84cdc97e0178aab7690788d3891d2fcf0a.tar.xz qemu-f6a51c84cdc97e0178aab7690788d3891d2fcf0a.zip | |
aio: add AioPollFn and io_poll() interface
The new AioPollFn io_poll() argument to aio_set_fd_handler() and
aio_set_event_handler() is used in the next patch.
Keep this code change separate due to the number of files it touches.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20161201192652.9509-3-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/block')
| -rw-r--r-- | include/block/aio.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/block/aio.h b/include/block/aio.h index c1519ec83a..7d9cd0d03f 100644 --- a/include/block/aio.h +++ b/include/block/aio.h @@ -44,6 +44,7 @@ void qemu_aio_ref(void *p); typedef struct AioHandler AioHandler; typedef void QEMUBHFunc(void *opaque); +typedef bool AioPollFn(void *opaque); typedef void IOHandler(void *opaque); struct ThreadPool; @@ -329,6 +330,7 @@ void aio_set_fd_handler(AioContext *ctx, bool is_external, IOHandler *io_read, IOHandler *io_write, + AioPollFn *io_poll, void *opaque); /* Register an event notifier and associated callbacks. Behaves very similarly @@ -341,7 +343,8 @@ void aio_set_fd_handler(AioContext *ctx, void aio_set_event_notifier(AioContext *ctx, EventNotifier *notifier, bool is_external, - EventNotifierHandler *io_read); + EventNotifierHandler *io_read, + AioPollFn *io_poll); /* Return a GSource that lets the main loop poll the file descriptors attached * to this AioContext. |
