mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
*_run_on_cpu: introduce run_on_cpu_data type
This changes the *_run_on_cpu APIs (and helpers) to pass data in a run_on_cpu_data type instead of a plain void *. This is because we sometimes want to pass a target address (target_ulong) and this fails on 32 bit hosts emulating 64 bit guests. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20161027151030.20863-24-alex.bennee@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
@@ -109,7 +109,7 @@ void cpu_list_remove(CPUState *cpu)
|
||||
struct qemu_work_item {
|
||||
struct qemu_work_item *next;
|
||||
run_on_cpu_func func;
|
||||
void *data;
|
||||
run_on_cpu_data data;
|
||||
bool free, exclusive, done;
|
||||
};
|
||||
|
||||
@@ -129,7 +129,7 @@ static void queue_work_on_cpu(CPUState *cpu, struct qemu_work_item *wi)
|
||||
qemu_cpu_kick(cpu);
|
||||
}
|
||||
|
||||
void do_run_on_cpu(CPUState *cpu, run_on_cpu_func func, void *data,
|
||||
void do_run_on_cpu(CPUState *cpu, run_on_cpu_func func, run_on_cpu_data data,
|
||||
QemuMutex *mutex)
|
||||
{
|
||||
struct qemu_work_item wi;
|
||||
@@ -154,7 +154,7 @@ void do_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)
|
||||
void async_run_on_cpu(CPUState *cpu, run_on_cpu_func func, run_on_cpu_data data)
|
||||
{
|
||||
struct qemu_work_item *wi;
|
||||
|
||||
@@ -296,7 +296,8 @@ void cpu_exec_end(CPUState *cpu)
|
||||
}
|
||||
}
|
||||
|
||||
void async_safe_run_on_cpu(CPUState *cpu, run_on_cpu_func func, void *data)
|
||||
void async_safe_run_on_cpu(CPUState *cpu, run_on_cpu_func func,
|
||||
run_on_cpu_data data)
|
||||
{
|
||||
struct qemu_work_item *wi;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user