2011-03-12 17:43:52 +01: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 14:36:41 +02:00
|
|
|
struct QemuSemaphore {
|
|
|
|
HANDLE sema;
|
|
|
|
};
|
|
|
|
|
2011-12-12 17:21:33 +01:00
|
|
|
typedef struct QemuThreadData QemuThreadData;
|
2011-03-12 17:43:52 +01:00
|
|
|
struct QemuThread {
|
2011-12-12 17:21:33 +01:00
|
|
|
QemuThreadData *data;
|
|
|
|
unsigned tid;
|
2011-03-12 17:43:52 +01:00
|
|
|
};
|
|
|
|
|
2011-12-13 13:43:52 +01:00
|
|
|
/* Only valid for joinable threads. */
|
|
|
|
HANDLE qemu_thread_get_handle(QemuThread *thread);
|
|
|
|
|
2011-03-12 17:43:52 +01:00
|
|
|
#endif
|