diff options
| author | Anthony Liguori <aliguori@us.ibm.com> | 2012-07-23 13:15:34 -0500 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-07-23 13:15:34 -0500 |
| commit | ef6bbdf9e5eb6da5cbdea1bf55e08709c6e181d5 (patch) | |
| tree | f3ac512465cc261cb6a3a70fba2da99b12231412 /cpus.c | |
| parent | 400006c27622d54ef588e1a9bd5a005d5fc9be5b (diff) | |
| parent | 43ffe61f9cc22f9ad4d05a18a304b1095fa1f2b3 (diff) | |
| download | focaccia-qemu-ef6bbdf9e5eb6da5cbdea1bf55e08709c6e181d5.tar.gz focaccia-qemu-ef6bbdf9e5eb6da5cbdea1bf55e08709c6e181d5.zip | |
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
* stefanha/trivial-patches: Fix some more Qemus in documentation and help text qdev: Fix Open Firmware comment cpus.c: Make all_cpu_threads_idle() static Use macro QEMU_PACKED for new packed structures Recognize PCID feature powerpc pci: fixed packing of ranges[]
Diffstat (limited to 'cpus.c')
| -rw-r--r-- | cpus.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/cpus.c b/cpus.c index b182b3d7d9..756e6245fd 100644 --- a/cpus.c +++ b/cpus.c @@ -61,6 +61,32 @@ static CPUArchState *next_cpu; +static bool cpu_thread_is_idle(CPUArchState *env) +{ + if (env->stop || env->queued_work_first) { + return false; + } + if (env->stopped || !runstate_is_running()) { + return true; + } + if (!env->halted || qemu_cpu_has_work(env) || kvm_irqchip_in_kernel()) { + return false; + } + return true; +} + +static bool all_cpu_threads_idle(void) +{ + CPUArchState *env; + + for (env = first_cpu; env != NULL; env = env->next_cpu) { + if (!cpu_thread_is_idle(env)) { + return false; + } + } + return true; +} + /***********************************************************/ /* guest cycle counter */ @@ -433,32 +459,6 @@ static int cpu_can_run(CPUArchState *env) return 1; } -static bool cpu_thread_is_idle(CPUArchState *env) -{ - if (env->stop || env->queued_work_first) { - return false; - } - if (env->stopped || !runstate_is_running()) { - return true; - } - if (!env->halted || qemu_cpu_has_work(env) || kvm_irqchip_in_kernel()) { - return false; - } - return true; -} - -bool all_cpu_threads_idle(void) -{ - CPUArchState *env; - - for (env = first_cpu; env != NULL; env = env->next_cpu) { - if (!cpu_thread_is_idle(env)) { - return false; - } - } - return true; -} - static void cpu_handle_guest_debug(CPUArchState *env) { gdb_set_stop_cpu(env); |