aboutsummaryrefslogtreecommitdiff
path: root/linux-user/main.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-06-09 19:47:04 +0200
committerAndreas Färber <afaerber@suse.de>2013-07-09 21:33:01 +0200
commita2247f8ec919c51c5749c2e3659841f1a733cce3 (patch)
treeaaadd0ec73949c9dd01af0233f863c3a7b91bb30 /linux-user/main.c
parent182735efaf956ccab50b6d74a4fed163e0f35660 (diff)
downloadqemu-a2247f8ec919c51c5749c2e3659841f1a733cce3.zip
qemu-a2247f8ec919c51c5749c2e3659841f1a733cce3.tar.gz
qemu-a2247f8ec919c51c5749c2e3659841f1a733cce3.tar.bz2
linux-user: Change thread_env to CPUState
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'linux-user/main.c')
-rw-r--r--linux-user/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 564bed6..67ea9ba 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -120,7 +120,7 @@ void fork_end(int child)
if (child) {
/* Child processes created by fork() only have a single thread.
Discard information about the parent threads. */
- first_cpu = ENV_GET_CPU(thread_env);
+ first_cpu = thread_cpu;
first_cpu->next_cpu = NULL;
pending_cpus = 0;
pthread_mutex_init(&exclusive_lock, NULL);
@@ -128,7 +128,7 @@ void fork_end(int child)
pthread_cond_init(&exclusive_cond, NULL);
pthread_cond_init(&exclusive_resume, NULL);
pthread_mutex_init(&tcg_ctx.tb_ctx.tb_lock, NULL);
- gdbserver_fork(thread_env);
+ gdbserver_fork((CPUArchState *)thread_cpu->env_ptr);
} else {
pthread_mutex_unlock(&exclusive_lock);
pthread_mutex_unlock(&tcg_ctx.tb_ctx.tb_lock);
@@ -232,7 +232,7 @@ void fork_start(void)
void fork_end(int child)
{
if (child) {
- gdbserver_fork(thread_env);
+ gdbserver_fork((CPUArchState *)thread_cpu->env_ptr);
}
}
@@ -3150,7 +3150,7 @@ void cpu_loop(CPUS390XState *env)
#endif /* TARGET_S390X */
-THREAD CPUArchState *thread_env;
+THREAD CPUState *thread_cpu;
void task_settid(TaskState *ts)
{
@@ -3640,7 +3640,7 @@ int main(int argc, char **argv, char **envp)
cpu_reset(ENV_GET_CPU(env));
#endif
- thread_env = env;
+ thread_cpu = ENV_GET_CPU(env);
if (getenv("QEMU_STRACE")) {
do_strace = 1;