diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-10-28 10:52:42 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-11-01 10:58:08 -0500 |
commit | b3c4bbe56dc707102d3abd969f51bb2aa9c6c53d (patch) | |
tree | 4494108465a1d39a4421da8c945db566a6691089 /exec.c | |
parent | 8a5f7b03a0a711ec8e04aeebe339cdb8b876794b (diff) |
Make cpu_single_env thread-local
Make cpu_single_env thread-local. This fixes a regression
in handling of multi-threaded programs in linux-user mode
(bug 823902).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[Peter Maydell: rename tls_cpu_single_env to cpu_single_env]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -120,7 +120,7 @@ static MemoryRegion *system_io; CPUState *first_cpu; /* current CPU in the current thread. It is only valid inside cpu_exec() */ -CPUState *cpu_single_env; +DEFINE_TLS(CPUState *,cpu_single_env); /* 0 = Do not count executed instructions. 1 = Precise instruction counting. 2 = Adaptive rate instruction counting. */ |