mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 14:53:54 -06:00
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>
This commit is contained in:
parent
608999d17c
commit
07a6ecf48f
19 changed files with 74 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue