diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-03-12 17:43:56 +0100 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-03-13 14:44:21 +0000 |
commit | eda48c344f35e5bd511dea3e8be56fb08c19b399 (patch) | |
tree | ce42c00d38ed2034cfe1d9babf758e12d4c22e1b /cpu-exec.c | |
parent | 38a42e7c527f3d1fb745211b1fbb7b9af76f790f (diff) |
inline cpu_halted into sole caller
All implementations are now the same, and there is only one caller,
so inline the function there.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'cpu-exec.c')
-rw-r--r-- | cpu-exec.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cpu-exec.c b/cpu-exec.c index 70c3e5ae1b..34eaedca04 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -208,8 +208,13 @@ int cpu_exec(CPUState *env1) uint8_t *tc_ptr; unsigned long next_tb; - if (cpu_halted(env1) == EXCP_HALTED) - return EXCP_HALTED; + if (env1->halted) { + if (!cpu_has_work(env1)) { + return EXCP_HALTED; + } + + env1->halted = 0; + } cpu_single_env = env1; |