qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH qom-cpu 04/59] cpus: Simplify cpu_synchronize_al


From: li guang
Subject: Re: [Qemu-devel] [PATCH qom-cpu 04/59] cpus: Simplify cpu_synchronize_all_post_init()
Date: Mon, 10 Jun 2013 10:04:19 +0800

Reviewed-by: liguang <address@hidden>

在 2013-06-09日的 21:12 +0200,Andreas Färber写道:
> Use new qemu_for_each_cpu().
> 
> Signed-off-by: Andreas Färber <address@hidden>
> ---
>  cpus.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/cpus.c b/cpus.c
> index 1186ad3..85b35f6 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -425,13 +425,14 @@ void cpu_synchronize_all_post_reset(void)
>      qemu_for_each_cpu(cpu_synchronize_one_post_reset, NULL);
>  }
>  
> -void cpu_synchronize_all_post_init(void)
> +static void cpu_synchronize_one_post_init(CPUState *cpu, void *data)
>  {
> -    CPUArchState *cpu;
> +    cpu_synchronize_post_init(cpu);
> +}
>  
> -    for (cpu = first_cpu; cpu; cpu = cpu->next_cpu) {
> -        cpu_synchronize_post_init(ENV_GET_CPU(cpu));
> -    }
> +void cpu_synchronize_all_post_init(void)
> +{
> +    qemu_for_each_cpu(cpu_synchronize_one_post_init, NULL);
>  }
>  
>  bool cpu_is_stopped(CPUState *cpu)





reply via email to

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