summaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-02 17:49:49 +0200
committerAndreas Färber <afaerber@suse.de>2012-08-02 18:12:17 +0200
commit216fc9a44b939eecc9594f6a07fdbebdf717659e (patch)
tree3421f87a45f813a525c004e16c8f2404e74a27c8 /cpus.c
parent814e612eaf1bfb93ee76097ec81e6d6a8855961b (diff)
downloadqemu-216fc9a44b939eecc9594f6a07fdbebdf717659e.tar.gz
qemu-216fc9a44b939eecc9594f6a07fdbebdf717659e.tar.bz2
qemu-216fc9a44b939eecc9594f6a07fdbebdf717659e.zip
cpu: Move thread_kicked to CPUState
Change field type to bool. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/cpus.c b/cpus.c
index 565abb4d5b..b61f60eb95 100644
--- a/cpus.c
+++ b/cpus.c
@@ -686,13 +686,15 @@ static void flush_queued_work(CPUArchState *env)
static void qemu_wait_io_event_common(CPUArchState *env)
{
+ CPUState *cpu = ENV_GET_CPU(env);
+
if (env->stop) {
env->stop = 0;
env->stopped = 1;
qemu_cond_signal(&qemu_pause_cond);
}
flush_queued_work(env);
- env->thread_kicked = false;
+ cpu->thread_kicked = false;
}
static void qemu_tcg_wait_io_event(void)
@@ -866,11 +868,12 @@ static void qemu_cpu_kick_thread(CPUArchState *env)
void qemu_cpu_kick(void *_env)
{
CPUArchState *env = _env;
+ CPUState *cpu = ENV_GET_CPU(env);
qemu_cond_broadcast(env->halt_cond);
- if (!tcg_enabled() && !env->thread_kicked) {
+ if (!tcg_enabled() && !cpu->thread_kicked) {
qemu_cpu_kick_thread(env);
- env->thread_kicked = true;
+ cpu->thread_kicked = true;
}
}
@@ -878,10 +881,11 @@ void qemu_cpu_kick_self(void)
{
#ifndef _WIN32
assert(cpu_single_env);
+ CPUState *cpu_single_cpu = ENV_GET_CPU(cpu_single_env);
- if (!cpu_single_env->thread_kicked) {
+ if (!cpu_single_cpu->thread_kicked) {
qemu_cpu_kick_thread(cpu_single_env);
- cpu_single_env->thread_kicked = true;
+ cpu_single_cpu->thread_kicked = true;
}
#else
abort();