qmp: fix aio_poll() assertion failure on Windows
commiteada6d9220b77ffee13a86ca8a7aba8fc4451e71
authorVolker Rümelin <vr_qemu@t-online.de>
Wed, 21 Oct 2020 06:40:33 +0000 (21 08:40 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 3 Nov 2020 15:24:56 +0000 (3 16:24 +0100)
treea87860973d51f53f5cb9bdc5d344328f32e6845e
parent83851c7c60c90e9fb6a23ff48076387a77bc33cd
qmp: fix aio_poll() assertion failure on Windows

Commit 9ce44e2ce2 "qmp: Move dispatcher to a coroutine" modified
aio_poll() in util/aio-posix.c to avoid an assertion failure. This
change is missing in util/aio-win32.c.

Apply the changes to util/aio-posix.c to util/aio-win32.c too.
This fixes an assertion failure on Windows whenever QEMU exits.

$ ./qemu-system-x86_64.exe -machine pc,accel=tcg -display gtk
**
ERROR:../qemu/util/aio-win32.c:337:aio_poll: assertion failed:
(in_aio_context_home_thread(ctx))
Bail out! ERROR:../qemu/util/aio-win32.c:337:aio_poll: assertion
failed: (in_aio_context_home_thread(ctx))

Fixes: 9ce44e2ce2 ("qmp: Move dispatcher to a coroutine")
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20201021064033.8600-1-vr_qemu@t-online.de>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
util/aio-win32.c