diff options
author | Peter Maydell | 2017-01-05 13:44:22 +0100 |
---|---|---|
committer | Peter Maydell | 2017-01-05 13:44:23 +0100 |
commit | e92fbc753df4fab9ee524b5ea07a51bee8b6bae4 (patch) | |
tree | e8146e574fda56477277699f38dfedbdcd908272 /aio-win32.c | |
parent | Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging (diff) | |
parent | iothread: add poll-grow and poll-shrink parameters (diff) | |
download | qemu-e92fbc753df4fab9ee524b5ea07a51bee8b6bae4.tar.gz qemu-e92fbc753df4fab9ee524b5ea07a51bee8b6bae4.tar.xz qemu-e92fbc753df4fab9ee524b5ea07a51bee8b6bae4.zip |
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
# gpg: Signature made Wed 04 Jan 2017 13:29:09 GMT
# gpg: using RSA key 0x9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha/tags/block-pull-request:
iothread: add poll-grow and poll-shrink parameters
aio: self-tune polling time
virtio: disable virtqueue notifications during polling
aio: add .io_poll_begin/end() callbacks
virtio: turn vq->notification into a nested counter
virtio-scsi: suppress virtqueue kick during processing
virtio-blk: suppress virtqueue kick during processing
iothread: add polling parameters
linux-aio: poll ring for completions
virtio: poll virtqueues for new buffers
aio: add polling mode to AioContext
aio: add AioPollFn and io_poll() interface
aio: add flag to skip fds to aio_dispatch()
HACKING: document #include order
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'aio-win32.c')
-rw-r--r-- | aio-win32.c | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/aio-win32.c b/aio-win32.c index c8c249e260..d19dc429d8 100644 --- a/aio-win32.c +++ b/aio-win32.c @@ -20,6 +20,7 @@ #include "block/block.h" #include "qemu/queue.h" #include "qemu/sockets.h" +#include "qapi/error.h" struct AioHandler { EventNotifier *e; @@ -38,6 +39,7 @@ void aio_set_fd_handler(AioContext *ctx, bool is_external, IOHandler *io_read, IOHandler *io_write, + AioPollFn *io_poll, void *opaque) { /* fd is a SOCKET in our case */ @@ -100,10 +102,18 @@ void aio_set_fd_handler(AioContext *ctx, aio_notify(ctx); } +void aio_set_fd_poll(AioContext *ctx, int fd, + IOHandler *io_poll_begin, + IOHandler *io_poll_end) +{ + /* Not implemented */ +} + void aio_set_event_notifier(AioContext *ctx, EventNotifier *e, bool is_external, - EventNotifierHandler *io_notify) + EventNotifierHandler *io_notify, + AioPollFn *io_poll) { AioHandler *node; @@ -150,6 +160,14 @@ void aio_set_event_notifier(AioContext *ctx, aio_notify(ctx); } +void aio_set_event_notifier_poll(AioContext *ctx, + EventNotifier *notifier, + EventNotifierHandler *io_poll_begin, + EventNotifierHandler *io_poll_end) +{ + /* Not implemented */ +} + bool aio_prepare(AioContext *ctx) { static struct timeval tv0; @@ -271,12 +289,14 @@ static bool aio_dispatch_handlers(AioContext *ctx, HANDLE event) return progress; } -bool aio_dispatch(AioContext *ctx) +bool aio_dispatch(AioContext *ctx, bool dispatch_fds) { bool progress; progress = aio_bh_poll(ctx); - progress |= aio_dispatch_handlers(ctx, INVALID_HANDLE_VALUE); + if (dispatch_fds) { + progress |= aio_dispatch_handlers(ctx, INVALID_HANDLE_VALUE); + } progress |= timerlistgroup_run_timers(&ctx->tlg); return progress; } @@ -374,3 +394,9 @@ bool aio_poll(AioContext *ctx, bool blocking) void aio_context_setup(AioContext *ctx) { } + +void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns, + int64_t grow, int64_t shrink, Error **errp) +{ + error_setg(errp, "AioContext polling is not implemented on Windows"); +} |