]> git.proxmox.com Git - qemu.git/blobdiff - qemu-thread.c
Refactor thread retrieval and check
[qemu.git] / qemu-thread.c
index fbc78fef4b49d341ce988a6587286402c85a5b0f..e3077733fca6f28b59c8e44e26d0ddf7aa4edb60 100644 (file)
@@ -176,14 +176,14 @@ void qemu_thread_signal(QemuThread *thread, int sig)
         error_exit(err, __func__);
 }
 
-void qemu_thread_self(QemuThread *thread)
+void qemu_thread_get_self(QemuThread *thread)
 {
     thread->thread = pthread_self();
 }
 
-int qemu_thread_equal(QemuThread *thread1, QemuThread *thread2)
+int qemu_thread_is_self(QemuThread *thread)
 {
-   return pthread_equal(thread1->thread, thread2->thread);
+   return pthread_equal(pthread_self(), thread->thread);
 }
 
 void qemu_thread_exit(void *retval)