qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/5] cpus-common: Add run_on_cpu2()


From: Peter Maydell
Subject: Re: [PATCH 2/5] cpus-common: Add run_on_cpu2()
Date: Thu, 23 Jun 2022 14:04:03 +0100

On Fri, 17 Jun 2022 at 15:57, Peter Xu <peterx@redhat.com> wrote:
>
> This version of run_on_cpu() allows to take an Error** to detect errors.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
>  cpus-common.c         | 27 +++++++++++++++++++++++++++
>  include/hw/core/cpu.h | 26 ++++++++++++++++++++++++++
>  softmmu/cpus.c        |  6 ++++++
>  3 files changed, 59 insertions(+)

> +/**
> + * run_on_cpu2:
> + * @cpu: The vCPU to run on.
> + * @func: The function to be executed.
> + * @data: Data to pass to the function.
> + * @errp: The Error** pointer to be passed into @func2.
> + *
> + * Schedules the function @func2 for execution on the vCPU @cpu, capture
> + * any error and put it into *@errp when provided.
> + */
> +void run_on_cpu2(CPUState *cpu, run_on_cpu_func2 func2, run_on_cpu_data data,
> +                 Error **errp);

Can you give this a more descriptive name, please, unless the plan
is to convert all the users of the existing run_on_cpu() and then
rename this function to that ?

thanks
-- PMM



reply via email to

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