diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2019-11-06 12:33:16 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2019-11-06 13:43:25 +0100 |
commit | 07a6ecf48feaddb4914ca8ec9603021f992ec3b9 (patch) | |
tree | 7f71c74f407533d7418e5e2f773246824a130d26 /linux-user/syscall.c | |
parent | 608999d17c8726eb4cfa967e95f06cf026a4dde2 (diff) | |
download | qemu-07a6ecf48feaddb4914ca8ec9603021f992ec3b9.zip |
linux-user: Introduce cpu_clone_regs_parent
We will need a target-specific hook for adjusting registers
in the parent during clone. Add an empty inline function for
each target, and invoke it from the proper places.
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20191106113318.10226-11-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 245ed315c8..ab9d933e53 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5821,6 +5821,7 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp, new_env = cpu_copy(env); /* Init regs that differ from the parent. */ cpu_clone_regs_child(new_env, newsp, flags); + cpu_clone_regs_parent(env, flags); new_cpu = env_cpu(new_env); new_cpu->opaque = ts; ts->bprm = parent_ts->bprm; @@ -5917,6 +5918,7 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp, if (flags & CLONE_CHILD_CLEARTID) ts->child_tidptr = child_tidptr; } else { + cpu_clone_regs_parent(env, flags); fork_end(0); } } |