Merge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-20150427-1' into staging
[qemu.git] / include / qemu / thread-win32.h
blob3d58081bed77dd1a65a3869f8e8645e432e189fc
1 #ifndef __QEMU_THREAD_WIN32_H
2 #define __QEMU_THREAD_WIN32_H 1
3 #include "windows.h"
5 struct QemuMutex {
6 CRITICAL_SECTION lock;
7 LONG owner;
8 };
10 struct QemuCond {
11 LONG waiters, target;
12 HANDLE sema;
13 HANDLE continue_event;
16 struct QemuSemaphore {
17 HANDLE sema;
20 struct QemuEvent {
21 HANDLE event;
24 typedef struct QemuThreadData QemuThreadData;
25 struct QemuThread {
26 QemuThreadData *data;
27 unsigned tid;
30 /* Only valid for joinable threads. */
31 HANDLE qemu_thread_get_handle(QemuThread *thread);
33 #endif