Patchwork [v2,upstream,16/22] do not use timedwait on qemu_pause_cond

login
register
mail settings
Submitter Paolo Bonzini
Date Feb. 26, 2011, 3:40 p.m.
Message ID <1298734819-1960-17-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/84664/
State New
Headers show

Comments

Paolo Bonzini - Feb. 26, 2011, 3:40 p.m.
all_vcpus_paused can start returning true after penv->stopped changes
from 0 to 1.  When this is done, qemu_pause_cond is always signaled.

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

Patch

diff --git a/cpus.c b/cpus.c
index e367b3b..8f169ad 100644
--- a/cpus.c
+++ b/cpus.c
@@ -938,7 +938,7 @@  void pause_all_vcpus(void)
     }
 
     while (!all_vcpus_paused()) {
-        qemu_cond_timedwait(&qemu_pause_cond, &qemu_global_mutex, 100);
+        qemu_cond_wait(&qemu_pause_cond, &qemu_global_mutex);
         penv = first_cpu;
         while (penv) {
             qemu_cpu_kick(penv);