From 14e6fe12a705c065fecdfd2a97199728123d4d9a Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 31 Oct 2016 10:36:08 +0100 Subject: *_run_on_cpu: introduce run_on_cpu_data type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Message-Id: <20161027151030.20863-24-alex.bennee@linaro.org> Signed-off-by: Paolo Bonzini --- cpus-common.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cpus-common.c') diff --git a/cpus-common.c b/cpus-common.c index 3e114529c9..59f751ecf9 100644 --- a/cpus-common.c +++ b/cpus-common.c @@ -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; -- cgit v1.2.3