|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [RFC 2/5] aio: Add io_read_poll() callback |
Date: | Tue, 03 Jun 2014 19:55:37 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
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.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |