aboutsummaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/cpus.c b/cpus.c
index a2e0642..0debe77 100644
--- a/cpus.c
+++ b/cpus.c
@@ -100,9 +100,7 @@ static int cpu_can_run(CPUState *env)
{
if (env->stop)
return 0;
- if (env->stopped)
- return 0;
- if (!vm_running)
+ if (env->stopped || !vm_running)
return 0;
return 1;
}
@@ -111,7 +109,7 @@ static int cpu_has_work(CPUState *env)
{
if (env->stop)
return 1;
- if (env->stopped)
+ if (env->stopped || !vm_running)
return 0;
if (!env->halted)
return 1;