@@ -195,7 +195,7 @@ int qemu_thread_get_affinity(const QemuThread *thread,
unsigned long **host_cpus, unsigned long *nbits);
void *qemu_thread_join(QemuThread *thread);
void qemu_thread_get_self(QemuThread *thread);
-bool qemu_thread_is_self(QemuThread *thread);
+bool qemu_thread_is_self(const QemuThread *thread);
G_NORETURN void qemu_thread_exit(void *retval);
void qemu_thread_naming(bool enable);
@@ -664,7 +664,7 @@ void qemu_thread_get_self(QemuThread *thread)
thread->thread = pthread_self();
}
-bool qemu_thread_is_self(QemuThread *thread)
+bool qemu_thread_is_self(const QemuThread *thread)
{
return pthread_equal(pthread_self(), thread->thread);
}
@@ -546,7 +546,7 @@ HANDLE qemu_thread_get_handle(QemuThread *thread)
return handle;
}
-bool qemu_thread_is_self(QemuThread *thread)
+bool qemu_thread_is_self(const QemuThread *thread)
{
return GetCurrentThreadId() == thread->tid;
}
QemuThread structure is not modified, only read. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- include/qemu/thread.h | 2 +- util/qemu-thread-posix.c | 2 +- util/qemu-thread-win32.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)