diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-10-26 11:43:58 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-10-31 10:38:13 +0100 |
commit | a27365265cc2fed1178bf25a205e8ee02a9c0caf (patch) | |
tree | aa5f89fd139ea99b02c8fac5c488eea6d62a9491 /block/raw-aio.h | |
parent | 10fb6e06825743bd517d4b5bb0e7b9e05e0fe92c (diff) |
raw-win32: implement native asynchronous I/O
With the new support for EventNotifiers in the AIO event loop, we
can hook a completion port to every opened file and use asynchronous
I/O on them.
Wine's support is extremely inefficient, also because it really does
the I/O synchronously on regular files. (!) But it works, and it is
good to keep the Win32 and POSIX ports as similar as possible.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'block/raw-aio.h')
-rw-r--r-- | block/raw-aio.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/block/raw-aio.h b/block/raw-aio.h index b3bb07377e..e77f361148 100644 --- a/block/raw-aio.h +++ b/block/raw-aio.h @@ -35,4 +35,14 @@ BlockDriverAIOCB *laio_submit(BlockDriverState *bs, void *aio_ctx, int fd, BlockDriverCompletionFunc *cb, void *opaque, int type); #endif +#ifdef _WIN32 +typedef struct QEMUWin32AIOState QEMUWin32AIOState; +QEMUWin32AIOState *win32_aio_init(void); +int win32_aio_attach(QEMUWin32AIOState *aio, HANDLE hfile); +BlockDriverAIOCB *win32_aio_submit(BlockDriverState *bs, + QEMUWin32AIOState *aio, HANDLE hfile, + int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, + BlockDriverCompletionFunc *cb, void *opaque, int type); +#endif + #endif /* QEMU_RAW_AIO_H */ |