Patchwork [CFT,09/12] do not use timedwait on qemu_system_cond

login
register
mail settings
Submitter Paolo Bonzini
Date Feb. 8, 2011, 5:18 p.m.
Message ID <1297185509-20996-10-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/82389/
State New
Headers show

Comments

Paolo Bonzini - Feb. 8, 2011, 5:18 p.m.
qemu_main_loop_start is the only place where qemu_system_ready is set
to 1, and it signals qemu_system_cond.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 cpus.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/cpus.c b/cpus.c
index be3d82d..3d12c50 100644
--- a/cpus.c
+++ b/cpus.c
@@ -798,7 +798,7 @@  static void *kvm_cpu_thread_fn(void *arg)
 
     /* and wait for machine initialization */
     while (!qemu_system_ready)
-        qemu_cond_timedwait(&qemu_system_cond, &qemu_global_mutex, 100);
+        qemu_cond_wait(&qemu_system_cond, &qemu_global_mutex);
 
     while (1) {
         if (cpu_can_run(env))
@@ -824,7 +824,7 @@  static void *tcg_cpu_thread_fn(void *arg)
 
     /* and wait for machine initialization */
     while (!qemu_system_ready)
-        qemu_cond_timedwait(&qemu_system_cond, &qemu_global_mutex, 100);
+        qemu_cond_wait(&qemu_system_cond, &qemu_global_mutex);
 
     while (1) {
         cpu_exec_all();