summaryrefslogtreecommitdiffstats
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorths2007-02-28 21:20:53 +0100
committerths2007-02-28 21:20:53 +0100
commitc5be9f0898b92d0d6bfb458fd50fc170f4300361 (patch)
treecbb92f2077a774f0864c02f508ce16084ce88a6e /linux-user/syscall.c
parent24C01 / 24C02 EEPROM emulation for Malta, by Stefan Weil. (diff)
downloadqemu-c5be9f0898b92d0d6bfb458fd50fc170f4300361.tar.gz
qemu-c5be9f0898b92d0d6bfb458fd50fc170f4300361.tar.xz
qemu-c5be9f0898b92d0d6bfb458fd50fc170f4300361.zip
Fix CPU chaining in linux-user emulation, by Gwenole Beauchesne.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2459 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f3f97b0d57..76b36524a1 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1720,8 +1720,7 @@ int do_fork(CPUState *env, unsigned int flags, unsigned long newsp)
ts->next = first_task_state;
first_task_state = ts;
/* we create a new CPU instance. */
- new_env = cpu_init();
- memcpy(new_env, env, sizeof(CPUState));
+ new_env = cpu_copy(env);
#if defined(TARGET_I386)
if (!newsp)
newsp = env->regs[R_ESP];