tcg: introduce tcg_current_cpu

This is already useful on Windows in order to remove tls.h, because
accesses to current_cpu are done from a different thread on that
platform.  It will be used on POSIX platforms as soon TCG stops using
signals to interrupt the execution of translated code.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2015-08-18 06:24:34 -07:00
parent 5039d6e235
commit 9373e63297
3 changed files with 9 additions and 11 deletions

View file

@ -387,6 +387,7 @@ tb_page_addr_t get_page_addr_code(CPUArchState *env1, target_ulong addr);
extern int singlestep;
/* cpu-exec.c */
extern CPUState *tcg_current_cpu;
extern volatile sig_atomic_t exit_request;
#if !defined(CONFIG_USER_ONLY)