summaryrefslogtreecommitdiff
path: root/os-win32.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-03-12 17:43:48 +0100
committerBlue Swirl <blauwirbel@gmail.com>2011-03-13 14:44:20 +0000
commit6279b61a140dea2bfccfa011457832fe28ac8a73 (patch)
treec57634dfe7658d5d41484cc88b434a8b9eff0690 /os-win32.c
parent6e0203ff7bd6be30444b445e8e6fe08256b22271 (diff)
downloadqemu-6279b61a140dea2bfccfa011457832fe28ac8a73.tar.gz
qemu-6279b61a140dea2bfccfa011457832fe28ac8a73.tar.bz2
qemu-6279b61a140dea2bfccfa011457832fe28ac8a73.zip
unlock iothread during WaitForMultipleObjects
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'os-win32.c')
-rw-r--r--os-win32.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/os-win32.c b/os-win32.c
index b214e6a678..c971d928ab 100644
--- a/os-win32.c
+++ b/os-win32.c
@@ -140,7 +140,9 @@ void os_host_main_loop_wait(int *timeout)
int err;
WaitObjects *w = &wait_objects;
+ qemu_mutex_unlock_iothread();
ret = WaitForMultipleObjects(w->num, w->events, FALSE, *timeout);
+ qemu_mutex_lock_iothread();
if (WAIT_OBJECT_0 + 0 <= ret && ret <= WAIT_OBJECT_0 + w->num - 1) {
if (w->func[ret - WAIT_OBJECT_0])
w->func[ret - WAIT_OBJECT_0](w->opaque[ret - WAIT_OBJECT_0]);