On 28/08/2015 16:36, Peter Maydell wrote: > With this patch, code-wise tcg_halt_cond and tcg_cpu_thread > are used in pretty much parallel ways (first call into > qemu_tcg_init_vcpu() sets them up, all the rest just copy > them into the CPU struct). The only difference is that one > of them a static at file scope and the other one is a static > at function scope. It seems a shame to not have them be > exactly parallel...
Good point, this does the trick: diff --git a/cpus.c b/cpus.c index 105b914..054dd68 100644 --- a/cpus.c +++ b/cpus.c @@ -786,8 +786,6 @@ static unsigned iothread_requesting_mutex; static QemuThread io_thread; -static QemuThread *tcg_cpu_thread; - /* cpu creation */ static QemuCond qemu_cpu_cond; /* system init */ @@ -1222,6 +1220,7 @@ static void qemu_tcg_init_vcpu(CPUState *cpu) { char thread_name[VCPU_THREAD_NAME_SIZE]; static QemuCond *tcg_halt_cond; + static QemuThread *tcg_cpu_thread; tcg_cpu_address_space_init(cpu, cpu->as); Paolo