On 03.06.2014 19:55, Paolo Bonzini wrote:
Il 31/05/2014 20:43, Max Reitz ha scritto:
@@ -108,7 +120,9 @@ bool aio_pending(AioContext *ctx)
         int revents;

         revents = node->pfd.revents & node->pfd.events;
- if (revents & (G_IO_IN | G_IO_HUP | G_IO_ERR) && node->io_read) { + if (revents & (G_IO_IN | G_IO_HUP | G_IO_ERR) && node->io_read &&
+            (!node->io_read_poll || node->io_read_poll(node->opaque)))
+        {
             return true;
         }

This would cause a busy loop whenever io_read_poll returns false. You would need to call io_read_poll when you fill the pollfds array, i.e. in aio_poll and aio_ctx_prepare.

Thanks; considering Stefan's comment, I'll see whether I can get away without implement io_read_poll().

Max

Paolo


Reply via email to