1 #ifndef QEMU_THREAD_WIN32_H 2 #define QEMU_THREAD_WIN32_H 3 4 #include <windows.h> 5 6 struct QemuMutex { 7 SRWLOCK lock; 8 #ifdef CONFIG_DEBUG_MUTEX 9 const char *file; 10 int line; 11 #endif 12 bool initialized; 13 }; 14 15 typedef struct QemuRecMutex QemuRecMutex; 16 struct QemuRecMutex { 17 CRITICAL_SECTION lock; 18 bool initialized; 19 }; 20 21 struct QemuCond { 22 CONDITION_VARIABLE var; 23 bool initialized; 24 }; 25 26 struct QemuSemaphore { 27 HANDLE sema; 28 bool initialized; 29 }; 30 31 typedef struct QemuThreadData QemuThreadData; 32 struct QemuThread { 33 QemuThreadData *data; 34 unsigned tid; 35 }; 36 37 /* Only valid for joinable threads. */ 38 HANDLE qemu_thread_get_handle(struct QemuThread *thread); 39 40 #endif 41