diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2017-02-13 14:52:33 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2017-02-21 11:39:39 +0000 |
commit | a153bf52b37e148f052b0869600877130671a03d (patch) | |
tree | e7fe53937bcfc9823bc6472929ed3801441ecca1 /util/aio-win32.c | |
parent | b9e413dd3756f71abe4e8cafe1d7a459ce74ccf4 (diff) | |
download | qemu-a153bf52b37e148f052b0869600877130671a03d.zip qemu-a153bf52b37e148f052b0869600877130671a03d.tar.gz qemu-a153bf52b37e148f052b0869600877130671a03d.tar.bz2 |
aio-posix: partially inline aio_dispatch into aio_poll
This patch prepares for the removal of unnecessary lockcnt inc/dec pairs.
Extract the dispatching loop for file descriptor handlers into a new
function aio_dispatch_handlers, and then inline aio_dispatch into
aio_poll.
aio_dispatch can now become void.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 20170213135235.12274-17-pbonzini@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'util/aio-win32.c')
-rw-r--r-- | util/aio-win32.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/util/aio-win32.c b/util/aio-win32.c index 20b63ce..442a179 100644 --- a/util/aio-win32.c +++ b/util/aio-win32.c @@ -309,16 +309,11 @@ static bool aio_dispatch_handlers(AioContext *ctx, HANDLE event) return progress; } -bool aio_dispatch(AioContext *ctx, bool dispatch_fds) +void aio_dispatch(AioContext *ctx) { - bool progress; - - progress = aio_bh_poll(ctx); - if (dispatch_fds) { - progress |= aio_dispatch_handlers(ctx, INVALID_HANDLE_VALUE); - } - progress |= timerlistgroup_run_timers(&ctx->tlg); - return progress; + aio_bh_poll(ctx); + aio_dispatch_handlers(ctx, INVALID_HANDLE_VALUE); + timerlistgroup_run_timers(&ctx->tlg); } bool aio_poll(AioContext *ctx, bool blocking) |