diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-09-26 09:40:39 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-11-01 10:58:08 -0500 |
commit | bdb7ca67de6ef7170f925fd33bdf77c05e46f76d (patch) | |
tree | 37f830ed3761ba778804af91b48f7ee076911e18 /cpus.c | |
parent | b3c4bbe56dc707102d3abd969f51bb2aa9c6c53d (diff) | |
download | qemu-bdb7ca67de6ef7170f925fd33bdf77c05e46f76d.tar.gz qemu-bdb7ca67de6ef7170f925fd33bdf77c05e46f76d.tar.bz2 qemu-bdb7ca67de6ef7170f925fd33bdf77c05e46f76d.zip |
Simplify cpu_exec_all to tcg_exec_all
After the removal of the non-threaded mode cpu_exec_all is now only used
by TCG. Refactor it accordingly, also dropping its unused return value.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'cpus.c')
-rw-r--r-- | cpus.c | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -748,6 +748,8 @@ static void *qemu_kvm_cpu_thread_fn(void *arg) return NULL; } +static void tcg_exec_all(void); + static void *qemu_tcg_cpu_thread_fn(void *arg) { CPUState *env = arg; @@ -769,7 +771,7 @@ static void *qemu_tcg_cpu_thread_fn(void *arg) } while (1) { - cpu_exec_all(); + tcg_exec_all(); if (use_icount && qemu_clock_deadline(vm_clock) <= 0) { qemu_notify_event(); } @@ -1016,7 +1018,7 @@ static int tcg_cpu_exec(CPUState *env) return ret; } -bool cpu_exec_all(void) +static void tcg_exec_all(void) { int r; @@ -1033,12 +1035,7 @@ bool cpu_exec_all(void) (env->singlestep_enabled & SSTEP_NOTIMER) == 0); if (cpu_can_run(env)) { - if (kvm_enabled()) { - r = kvm_cpu_exec(env); - qemu_kvm_eat_signals(env); - } else { - r = tcg_cpu_exec(env); - } + r = tcg_cpu_exec(env); if (r == EXCP_DEBUG) { cpu_handle_guest_debug(env); break; @@ -1048,7 +1045,6 @@ bool cpu_exec_all(void) } } exit_request = 0; - return !all_cpu_threads_idle(); } void set_numa_modes(void) |