From 3672fa50837c1700deb1f86f0068c22c7e49aa22 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 9 Jul 2014 11:53:04 +0200 Subject: AioContext: run bottom halves after polling Make the dispatching phase the same before blocking and afterwards. The next patch will make aio_dispatch public and use it directly for the GSource case, instead of aio_poll. aio_poll can then be simplified heavily. Signed-off-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- aio-posix.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'aio-posix.c') diff --git a/aio-posix.c b/aio-posix.c index 55706f8205..798a3ff532 100644 --- a/aio-posix.c +++ b/aio-posix.c @@ -264,6 +264,10 @@ bool aio_poll(AioContext *ctx, bool blocking) /* Run dispatch even if there were no readable fds to run timers */ aio_set_dispatching(ctx, true); + if (aio_bh_poll(ctx)) { + progress = true; + } + if (aio_dispatch(ctx)) { progress = true; } -- cgit v1.2.1