summaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-03 06:59:07 +0200
committerAndreas Färber <afaerber@suse.de>2012-10-31 04:12:23 +0100
commit9f09e18a6df39ab11cd80e203c5736af1823f3b3 (patch)
treea068474121d1d07026de378123bae50bbd11cc01 /exec.c
parentf100f0b38fe43c683f437a8fa3e449d6752f6a58 (diff)
downloadqemu-9f09e18a6df39ab11cd80e203c5736af1823f3b3.zip
cpu: Move thread_id to CPUState
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index 038e40d09b..df6793812f 100644
--- a/exec.c
+++ b/exec.c
@@ -689,6 +689,9 @@ CPUArchState *qemu_get_cpu(int cpu)
void cpu_exec_init(CPUArchState *env)
{
+#ifndef CONFIG_USER_ONLY
+ CPUState *cpu = ENV_GET_CPU(env);
+#endif
CPUArchState **penv;
int cpu_index;
@@ -707,7 +710,7 @@ void cpu_exec_init(CPUArchState *env)
QTAILQ_INIT(&env->breakpoints);
QTAILQ_INIT(&env->watchpoints);
#ifndef CONFIG_USER_ONLY
- env->thread_id = qemu_get_thread_id();
+ cpu->thread_id = qemu_get_thread_id();
#endif
*penv = env;
#if defined(CONFIG_USER_ONLY)