aboutsummaryrefslogtreecommitdiff
path: root/qemu-thread-win32.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-12-12 17:21:33 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2011-12-12 17:06:22 -0600
commit403e633126b7a781ecd48a29e3355770d46bbf1a (patch)
tree859ac9f293512c6c889c814c600a67bacb3bb7b5 /qemu-thread-win32.h
parent8763046b4b27f59ce0b639dbca896a01bf7b1388 (diff)
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