[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 uq/master 14/22] do not use timedwait on qemu_hal
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH v3 uq/master 14/22] do not use timedwait on qemu_halt_cond |
Date: |
Mon, 28 Feb 2011 10:10:16 +0100 |
The following conditions can cause cpu_has_work(env) to become true:
- env->queued_work_first: run_on_cpu is already kicking the VCPU
- env->stop = 1: pause_all_vcpus is already kicking the VCPU
- env->stopped = 0: resume_all_vcpus is already kicking the VCPU
- vm_running = 1: vm_start is calling resume_all_vcpus
- env->halted = 0: see previous patch
- qemu_cpu_has_work(env): when it becomes true, board code should set
env->halted = 0 too.
Signed-off-by: Paolo Bonzini <address@hidden>
---
cpus.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cpus.c b/cpus.c
index 6cfb45b..4c3837f 100644
--- a/cpus.c
+++ b/cpus.c
@@ -771,7 +771,7 @@ static void qemu_tcg_wait_io_event(void)
CPUState *env;
while (all_cpu_threads_idle()) {
- qemu_cond_timedwait(tcg_halt_cond, &qemu_global_mutex, 1000);
+ qemu_cond_wait(tcg_halt_cond, &qemu_global_mutex);
}
qemu_mutex_unlock(&qemu_global_mutex);
@@ -794,7 +794,7 @@ static void qemu_tcg_wait_io_event(void)
static void qemu_kvm_wait_io_event(CPUState *env)
{
while (cpu_thread_is_idle(env)) {
- qemu_cond_timedwait(env->halt_cond, &qemu_global_mutex, 1000);
+ qemu_cond_wait(env->halt_cond, &qemu_global_mutex);
}
qemu_kvm_eat_signals(env);
--
1.7.4
- [Qemu-devel] Re: [PATCH v3 uq/master 05/22] add win32 qemu-thread implementation, (continued)
- [Qemu-devel] [PATCH v3 uq/master 04/22] Refactor thread retrieval and check, Paolo Bonzini, 2011/02/28
- [Qemu-devel] [PATCH v3 uq/master 18/22] iothread stops the vcpu thread via IPI, Paolo Bonzini, 2011/02/28
- [Qemu-devel] [PATCH v3 uq/master 06/22] include qemu-thread.h early, Paolo Bonzini, 2011/02/28
- [Qemu-devel] [PATCH v3 uq/master 16/22] do not use timedwait on qemu_pause_cond, Paolo Bonzini, 2011/02/28
- [Qemu-devel] [PATCH v3 uq/master 19/22] merge all signal initialization with qemu_signalfd_init, rename, Paolo Bonzini, 2011/02/28
- [Qemu-devel] [PATCH v3 uq/master 17/22] do not use timedwait on qemu_cpu_cond, Paolo Bonzini, 2011/02/28
- [Qemu-devel] [PATCH v3 uq/master 09/22] target-sh4: move intr_at_halt out of cpu_halted(), Paolo Bonzini, 2011/02/28
- [Qemu-devel] [PATCH v3 uq/master 12/22] exit round-robin vcpu loop if cpu->stopped is true, Paolo Bonzini, 2011/02/28
- [Qemu-devel] [PATCH v3 uq/master 14/22] do not use timedwait on qemu_halt_cond,
Paolo Bonzini <=
- [Qemu-devel] [PATCH v3 uq/master 20/22] provide dummy signal init functions for win32, Paolo Bonzini, 2011/02/28
- [Qemu-devel] [PATCH v3 uq/master 21/22] protect qemu_cpu_kick_self for Win32, Paolo Bonzini, 2011/02/28
- [Qemu-devel] [PATCH v3 uq/master 03/22] use win32 timer queues, Paolo Bonzini, 2011/02/28
- [Qemu-devel] [PATCH v3 uq/master 10/22] inline cpu_halted into sole caller, Paolo Bonzini, 2011/02/28
- [Qemu-devel] [PATCH v3 uq/master 22/22] add Win32 IPI service, Paolo Bonzini, 2011/02/28
- [Qemu-devel] [PATCH v3 uq/master 15/22] do not use timedwait on qemu_system_cond, Paolo Bonzini, 2011/02/28
- [Qemu-devel] [PATCH v3 uq/master 01/22] unlock iothread during WaitForMultipleObjects, Paolo Bonzini, 2011/02/28
- [Qemu-devel] [PATCH v3 uq/master 11/22] always qemu_cpu_kick after unhalting a cpu, Paolo Bonzini, 2011/02/28