diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-12-12 17:21:33 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-12-12 17:06:22 -0600 |
commit | 403e633126b7a781ecd48a29e3355770d46bbf1a (patch) | |
tree | 859ac9f293512c6c889c814c600a67bacb3bb7b5 /qemu-thread-win32.h | |
parent | 8763046b4b27f59ce0b639dbca896a01bf7b1388 (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.h | 5 |
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 |