@@ -838,7 +838,7 @@ static inline bool cpu_has_work(CPUState *cpu)
*
* Returns: %true if called from @cpu's thread, %false otherwise.
*/
-bool qemu_cpu_is_self(CPUState *cpu);
+bool qemu_cpu_is_self(const CPUState *cpu);
/**
* qemu_cpu_kick:
@@ -205,7 +205,7 @@ void stop_all_tasks(void)
start_exclusive();
}
-bool qemu_cpu_is_self(CPUState *cpu)
+bool qemu_cpu_is_self(const CPUState *cpu)
{
return thread_cpu == cpu;
}
@@ -181,7 +181,7 @@ void fork_end(pid_t pid)
__thread CPUState *thread_cpu;
-bool qemu_cpu_is_self(CPUState *cpu)
+bool qemu_cpu_is_self(const CPUState *cpu)
{
return thread_cpu == cpu;
}
@@ -502,7 +502,7 @@ void qemu_cpu_kick_self(void)
cpus_kick_thread(current_cpu);
}
-bool qemu_cpu_is_self(CPUState *cpu)
+bool qemu_cpu_is_self(const CPUState *cpu)
{
return qemu_thread_is_self(cpu->thread);
}
CPUState structure is not modified, make it const. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- include/hw/core/cpu.h | 2 +- bsd-user/main.c | 2 +- linux-user/main.c | 2 +- system/cpus.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)