summaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2012-07-19 16:52:27 +0100
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-07-21 10:54:40 +0100
commitac873f1ed5060653719320d562bff7c8f6c4e6a9 (patch)
tree690e5f8f635b90a1133d8140f1fde09450a3d577 /cpus.c
parent7c7bb0223e667c656950427cd17bf95d92993f76 (diff)
downloadqemu-ac873f1ed5060653719320d562bff7c8f6c4e6a9.tar.gz
cpus.c: Make all_cpu_threads_idle() static
Commit 946fb27c1 moved all the uses of all_cpu_threads_idle() into cpus.c. This means we can mark the function 'static' (again), if we shuffle it a bit earlier in the source file. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c52
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);