qemu-devel
[Top][All Lists]
Advanced

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

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


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

在 2013-06-09日的 21:12 +0200,Andreas Färber写道:
> Use new qemu_for_each_cpu().
> 
> Signed-off-by: Andreas Färber <address@hidden>

Reviewed-by: liguang <address@hidden>

> ---
>  cpus.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/cpus.c b/cpus.c
> index 8ff66c3..1186ad3 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -415,13 +415,14 @@ void cpu_synchronize_all_states(void)
>      qemu_for_each_cpu(cpu_synchronize_one_state, NULL);
>  }
>  
> -void cpu_synchronize_all_post_reset(void)
> +static void cpu_synchronize_one_post_reset(CPUState *cpu, void *data)
>  {
> -    CPUArchState *cpu;
> +    cpu_synchronize_post_reset(cpu);
> +}
>  
> -    for (cpu = first_cpu; cpu; cpu = cpu->next_cpu) {
> -        cpu_synchronize_post_reset(ENV_GET_CPU(cpu));
> -    }
> +void cpu_synchronize_all_post_reset(void)
> +{
> +    qemu_for_each_cpu(cpu_synchronize_one_post_reset, NULL);
>  }
>  
>  void cpu_synchronize_all_post_init(void)





reply via email to

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