qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [patch 10/14] qemu: introduce lock/unlock_iothread


From: mtosatti
Subject: [Qemu-devel] [patch 10/14] qemu: introduce lock/unlock_iothread
Date: Wed, 22 Apr 2009 16:15:14 -0300
User-agent: quilt/0.46-1

Hook to allow iothread to drop the global mutex.

Signed-off-by: Marcelo Tosatti <address@hidden>

Index: qemu-iothread-4/vl.c
===================================================================
--- qemu-iothread-4.orig/vl.c
+++ qemu-iothread-4/vl.c
@@ -3686,6 +3686,9 @@ static void qemu_init_main_loop(void)
 {
 }
 
+#define qemu_mutex_lock_iothread() do { } while (0)
+#define qemu_mutex_unlock_iothread() do { } while (0)
+
 #ifdef _WIN32
 static void host_main_loop_wait(int *timeout)
 {
@@ -3778,7 +3781,9 @@ void main_loop_wait(int timeout)
         slirp_select_fill(&nfds, &rfds, &wfds, &xfds);
     }
 #endif
+    qemu_mutex_unlock_iothread();
     ret = select(nfds + 1, &rfds, &wfds, &xfds, &tv);
+    qemu_mutex_lock_iothread();
     if (ret > 0) {
         IOHandlerRecord **pioh;
 

-- 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]