diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-06-09 03:44:00 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-10-30 09:30:52 +0100 |
commit | 9958c351eee5b34051fd8061fe24f490ceca1334 (patch) | |
tree | 1ef30d57f2010b3f8f33b021ce371ca517e87b27 /aio.c | |
parent | b078dc3cfec2d6d037caef91204ebf0a78e7ac06 (diff) |
aio: provide platform-independent API
This adds to aio.c a platform-independent API based on EventNotifiers, that
can be used by both POSIX and Win32.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'aio.c')
-rw-r--r-- | aio.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -95,6 +95,15 @@ void qemu_aio_set_fd_handler(int fd, qemu_set_fd_handler2(fd, NULL, io_read, io_write, opaque); } +void qemu_aio_set_event_notifier(EventNotifier *notifier, + EventNotifierHandler *io_read, + AioFlushEventNotifierHandler *io_flush) +{ + qemu_aio_set_fd_handler(event_notifier_get_fd(notifier), + (IOHandler *)io_read, NULL, + (AioFlushHandler *)io_flush, notifier); +} + void qemu_aio_flush(void) { while (qemu_aio_wait()); |