2011-03-13 00:43:52 +08:00
|
|
|
#ifndef __QEMU_THREAD_WIN32_H
|
|
|
|
#define __QEMU_THREAD_WIN32_H 1
|
|
|
|
#include "windows.h"
|
|
|
|
|
|
|
|
struct QemuMutex {
|
|
|
|
CRITICAL_SECTION lock;
|
|
|
|
LONG owner;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct QemuCond {
|
|
|
|
LONG waiters, target;
|
|
|
|
HANDLE sema;
|
|
|
|
HANDLE continue_event;
|
|
|
|
};
|
|
|
|
|
2011-08-08 20:36:41 +08:00
|
|
|
struct QemuSemaphore {
|
|
|
|
HANDLE sema;
|
|
|
|
};
|
|
|
|
|
2011-12-13 00:21:33 +08:00
|
|
|
typedef struct QemuThreadData QemuThreadData;
|
2011-03-13 00:43:52 +08:00
|
|
|
struct QemuThread {
|
2011-12-13 00:21:33 +08:00
|
|
|
QemuThreadData *data;
|
|
|
|
unsigned tid;
|
2011-03-13 00:43:52 +08:00
|
|
|
};
|
|
|
|
|
2011-12-13 20:43:52 +08:00
|
|
|
/* Only valid for joinable threads. */
|
|
|
|
HANDLE qemu_thread_get_handle(QemuThread *thread);
|
|
|
|
|
2011-03-13 00:43:52 +08:00
|
|
|
#endif
|