mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
linux-user: Rename cpu_clone_regs to cpu_clone_regs_child
We will need a target-specific hook for adjusting registers in the parent during clone. To avoid confusion, rename the one we have to make it clear it affects the child. At the same time, pass in the flags from the clone syscall. We will need them for correct behaviour for Sparc. 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-10-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
b220cbcf25
commit
608999d17c
19 changed files with 40 additions and 20 deletions
|
@ -5820,7 +5820,7 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp,
|
|||
/* we create a new CPU instance. */
|
||||
new_env = cpu_copy(env);
|
||||
/* Init regs that differ from the parent. */
|
||||
cpu_clone_regs(new_env, newsp);
|
||||
cpu_clone_regs_child(new_env, newsp, flags);
|
||||
new_cpu = env_cpu(new_env);
|
||||
new_cpu->opaque = ts;
|
||||
ts->bprm = parent_ts->bprm;
|
||||
|
@ -5899,7 +5899,7 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp,
|
|||
ret = fork();
|
||||
if (ret == 0) {
|
||||
/* Child Process. */
|
||||
cpu_clone_regs(env, newsp);
|
||||
cpu_clone_regs_child(env, newsp, flags);
|
||||
fork_end(1);
|
||||
/* There is a race condition here. The parent process could
|
||||
theoretically read the TID in the child process before the child
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue