mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
cpus-common: Introduce async_safe_run_on_cpu()
Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
758e1b2b62
commit
53f5ed9506
2 changed files with 45 additions and 2 deletions
|
@ -655,6 +655,20 @@ void run_on_cpu(CPUState *cpu, run_on_cpu_func func, void *data);
|
|||
*/
|
||||
void async_run_on_cpu(CPUState *cpu, run_on_cpu_func func, void *data);
|
||||
|
||||
/**
|
||||
* async_safe_run_on_cpu:
|
||||
* @cpu: The vCPU to run on.
|
||||
* @func: The function to be executed.
|
||||
* @data: Data to pass to the function.
|
||||
*
|
||||
* Schedules the function @func for execution on the vCPU @cpu asynchronously,
|
||||
* while all other vCPUs are sleeping.
|
||||
*
|
||||
* Unlike run_on_cpu and async_run_on_cpu, the function is run outside the
|
||||
* BQL.
|
||||
*/
|
||||
void async_safe_run_on_cpu(CPUState *cpu, run_on_cpu_func func, void *data);
|
||||
|
||||
/**
|
||||
* qemu_get_cpu:
|
||||
* @index: The CPUState@cpu_index value of the CPU to obtain.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue