From 6a00d60127dc0e1d4efadafe1feb88f05030fe52 Mon Sep 17 00:00:00 2001 From: bellard Date: Mon, 21 Nov 2005 23:25:50 +0000 Subject: SMP support git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1640 c046a42c-6fe2-441c-8c8c-71466251a162 --- cpu-exec.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cpu-exec.c') diff --git a/cpu-exec.c b/cpu-exec.c index 9f6487adf..72e32684a 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -251,6 +251,8 @@ int cpu_exec(CPUState *env1) TranslationBlock *tb; uint8_t *tc_ptr; + cpu_single_env = env1; + /* first we save global registers */ saved_env = env; env = env1; @@ -755,6 +757,8 @@ int cpu_exec(CPUState *env1) T2 = saved_T2; #endif env = saved_env; + /* fail safe : never use cpu_single_env outside cpu_exec() */ + cpu_single_env = NULL; return ret; } -- cgit v1.2.3