@@ -183,3 +183,12 @@ void qemu_thread_exit(void *retval)
{
pthread_exit(retval);
}
+
+void qemu_thread_join(QemuThread *thread, void **retval)
+{
+ int err;
+
+ err = pthread_join(thread->thread, retval);
+ if (err)
+ error_exit(err, __func__);
+}
@@ -40,5 +40,6 @@ void qemu_thread_signal(QemuThread *thread, int sig);
void qemu_thread_self(QemuThread *thread);
int qemu_thread_equal(QemuThread *thread1, QemuThread *thread2);
void qemu_thread_exit(void *retval);
+void qemu_thread_join(QemuThread *thread, void **retval);
#endif
Add missing function to join created thread. Signed-off-by: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp> --- qemu-thread.c | 9 +++++++++ qemu-thread.h | 1 + 2 files changed, 10 insertions(+), 0 deletions(-)