diff --git a/qemu-thread-posix.c b/qemu-thread-posix.c index 9e1b5fbdaa0171e233ef156ac536617510f92274..8fbabdac36442e629c7e0f1a17350f9b71d2e222 100644 --- a/qemu-thread-posix.c +++ b/qemu-thread-posix.c @@ -151,7 +151,7 @@ void qemu_thread_get_self(QemuThread *thread) thread->thread = pthread_self(); } -int qemu_thread_is_self(QemuThread *thread) +bool qemu_thread_is_self(QemuThread *thread) { return pthread_equal(pthread_self(), thread->thread); } diff --git a/qemu-thread-win32.c b/qemu-thread-win32.c index 3524c8b785a4cb4a29798464143eb7fe629cb704..177b398cc4fe87de9abbe5293da3a5f98c17455e 100644 --- a/qemu-thread-win32.c +++ b/qemu-thread-win32.c @@ -330,7 +330,7 @@ HANDLE qemu_thread_get_handle(QemuThread *thread) return handle; } -int qemu_thread_is_self(QemuThread *thread) +bool qemu_thread_is_self(QemuThread *thread) { return GetCurrentThreadId() == thread->tid; } diff --git a/qemu-thread.h b/qemu-thread.h index a78a8f2524bf9affd5a476433b0bc2f69e6ccb53..05fdaaf50e4209ad62ea216a6c1e39ab86f0fdb6 100644 --- a/qemu-thread.h +++ b/qemu-thread.h @@ -2,6 +2,7 @@ #define __QEMU_THREAD_H 1 #include +#include typedef struct QemuMutex QemuMutex; typedef struct QemuCond QemuCond; @@ -42,7 +43,7 @@ void qemu_thread_create(QemuThread *thread, void *arg, int mode); void *qemu_thread_join(QemuThread *thread); void qemu_thread_get_self(QemuThread *thread); -int qemu_thread_is_self(QemuThread *thread); +bool qemu_thread_is_self(QemuThread *thread); void qemu_thread_exit(void *retval); #endif