[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/4] qemu-thread: add qemu_thread_join().
From: |
Yoshiaki Tamura |
Subject: |
[Qemu-devel] [PATCH 1/4] qemu-thread: add qemu_thread_join(). |
Date: |
Wed, 2 Jun 2010 00:40:18 +0900 |
Add missing function to join created thread.
Signed-off-by: Yoshiaki Tamura <address@hidden>
---
qemu-thread.c | 9 +++++++++
qemu-thread.h | 1 +
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/qemu-thread.c b/qemu-thread.c
index afc9933..21953cd 100644
--- a/qemu-thread.c
+++ b/qemu-thread.c
@@ -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__);
+}
diff --git a/qemu-thread.h b/qemu-thread.h
index 19bb30c..9225b33 100644
--- a/qemu-thread.h
+++ b/qemu-thread.h
@@ -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
--
1.7.0.31.g1df487
[Qemu-devel] [PATCH 3/4] arch_init: calculate transferred bytes at ram_load()., Yoshiaki Tamura, 2010/06/01
[Qemu-devel] [PATCH 1/4] qemu-thread: add qemu_thread_join().,
Yoshiaki Tamura <=
[Qemu-devel] Re: [PATCH 0/4] Threaded tcp incoming migration., Anthony Liguori, 2010/06/01