aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 450eb3ce65..e8406917e3 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -127,9 +127,9 @@ int cpu_get_pic_interrupt(CPUX86State *env)
/* Make sure everything is in a consistent state for calling fork(). */
void fork_start(void)
{
- cpu_list_lock();
- qemu_mutex_lock(&tb_ctx.tb_lock);
mmap_fork_start();
+ qemu_mutex_lock(&tb_ctx.tb_lock);
+ cpu_list_lock();
}
void fork_end(int child)