summaryrefslogtreecommitdiffstats
path: root/qemu-thread-win32.h
diff options
context:
space:
mode:
authorPaolo Bonzini2011-12-12 17:21:33 +0100
committerAnthony Liguori2011-12-13 00:06:22 +0100
commit403e633126b7a781ecd48a29e3355770d46bbf1a (patch)
tree859ac9f293512c6c889c814c600a67bacb3bb7b5 /qemu-thread-win32.h
parentqemu-thread: implement joinable threads for POSIX (diff)
downloadqemu-403e633126b7a781ecd48a29e3355770d46bbf1a.tar.gz
qemu-403e633126b7a781ecd48a29e3355770d46bbf1a.tar.xz
qemu-403e633126b7a781ecd48a29e3355770d46bbf1a.zip
qemu-thread: implement joinable threads for Win32
Rewrite the handshaking between qemu_thread_create and the win32_start_routine, so that the thread can be joined without races. Similar handshaking is done now between qemu_thread_exit and qemu_thread_join. This also simplifies how QemuThreads are initialized. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-thread-win32.h')
-rw-r--r--qemu-thread-win32.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/qemu-thread-win32.h b/qemu-thread-win32.h
index 878f86a910..2983490a58 100644
--- a/qemu-thread-win32.h
+++ b/qemu-thread-win32.h
@@ -13,9 +13,10 @@ struct QemuCond {
HANDLE continue_event;
};
+typedef struct QemuThreadData QemuThreadData;
struct QemuThread {
- HANDLE thread;
- void *ret;
+ QemuThreadData *data;
+ unsigned tid;
};
#endif