mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
8a5f7b03a0
commit
b3c4bbe56d
2 changed files with 4 additions and 2 deletions
2
exec.c
2
exec.c
|
@ -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. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue