qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 02/10] cpus: remove tcg_halt_cond global variabl


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 02/10] cpus: remove tcg_halt_cond global variable.
Date: Fri, 28 Aug 2015 15:36:03 +0100

On 12 August 2015 at 17:40, Paolo Bonzini <address@hidden> wrote:
> From: KONRAD Frederic <address@hidden>
>
> This removes tcg_halt_cond global variable.
> We need one QemuCond per virtual cpu for multithread TCG.
>
> Signed-off-by: KONRAD Frederic <address@hidden>
> Message-Id: <address@hidden>
> [Keep tcg_halt_cond for bisectability, while making it static. - Paolo]
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  cpus.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/cpus.c b/cpus.c
> index 9224488..8884278 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -813,7 +813,6 @@ static unsigned iothread_requesting_mutex;
>  static QemuThread io_thread;
>
>  static QemuThread *tcg_cpu_thread;
> -static QemuCond *tcg_halt_cond;
>

> @@ -1265,6 +1262,7 @@ void resume_all_vcpus(void)
>  static void qemu_tcg_init_vcpu(CPUState *cpu)
>  {
>      char thread_name[VCPU_THREAD_NAME_SIZE];
> +    static QemuCond *tcg_halt_cond;
>
>      tcg_cpu_address_space_init(cpu, cpu->as);

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...

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]