summaryrefslogtreecommitdiff
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index a0915a455b..59c91f8da9 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3202,6 +3202,7 @@ static void *clone_func(void *arg)
env = info->env;
thread_env = env;
info->tid = gettid();
+ env->host_tid = info->tid;
if (info->child_tidptr)
put_user_u32(info->tid, info->child_tidptr);
if (info->parent_tidptr)
@@ -3792,6 +3793,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
/* FIXME: This probably breaks if a signal arrives. We should probably
be disabling signals. */
if (first_cpu->next_cpu) {
+ TaskState *ts;
CPUState **lastp;
CPUState *p;
@@ -3809,7 +3811,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
/* Remove the CPU from the list. */
*lastp = p->next_cpu;
cpu_list_unlock();
- TaskState *ts = ((CPUState *)cpu_env)->opaque;
+ ts = ((CPUState *)cpu_env)->opaque;
if (ts->child_tidptr) {
put_user_u32(0, ts->child_tidptr);
sys_futex(g2h(ts->child_tidptr), FUTEX_WAKE, INT_MAX,