Re: [Qemu-devel] [PATCH v4 04/17] tests: adjust test-thread-pool to new aio_poll() semantics

2013-06-27 Thread Paolo Bonzini
Il 14/06/2013 13:43, Stefan Hajnoczi ha scritto: -/* Wait until all aio and bh activity has finished */ -static void qemu_aio_wait_all(void) -{ -while (aio_poll(ctx, true)) { -/* Do nothing */ -} -} - static void test_submit(void) { WorkerTestData data = { .n =

[Qemu-devel] [PATCH v4 04/17] tests: adjust test-thread-pool to new aio_poll() semantics

2013-06-14 Thread Stefan Hajnoczi
aio_poll(ctx, true) will soon block when fd handlers have been set. Previously aio_poll() would return early if all .io_flush() returned false. This means we need to check the equivalent of the .io_flush() condition *before* calling aio_poll(ctx, true) to avoid deadlock. Signed-off-by: Stefan