mirror of
https://github.com/xemu-project/xemu.git
synced 2024-12-13 23:08:57 +00:00
4b193bb798
Move the declarations from thread-win32.h into thread.h and remove the macro redirection from thread-posix.h. This will be required by following cleanups. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210614233143.1221879-4-richard.henderson@linaro.org>
47 lines
764 B
C
47 lines
764 B
C
#ifndef QEMU_THREAD_WIN32_H
|
|
#define QEMU_THREAD_WIN32_H
|
|
|
|
#include <windows.h>
|
|
|
|
struct QemuMutex {
|
|
SRWLOCK lock;
|
|
#ifdef CONFIG_DEBUG_MUTEX
|
|
const char *file;
|
|
int line;
|
|
#endif
|
|
bool initialized;
|
|
};
|
|
|
|
typedef struct QemuRecMutex QemuRecMutex;
|
|
struct QemuRecMutex {
|
|
CRITICAL_SECTION lock;
|
|
bool initialized;
|
|
};
|
|
|
|
struct QemuCond {
|
|
CONDITION_VARIABLE var;
|
|
bool initialized;
|
|
};
|
|
|
|
struct QemuSemaphore {
|
|
HANDLE sema;
|
|
bool initialized;
|
|
};
|
|
|
|
struct QemuEvent {
|
|
int value;
|
|
HANDLE event;
|
|
bool initialized;
|
|
};
|
|
|
|
typedef struct QemuThreadData QemuThreadData;
|
|
struct QemuThread {
|
|
QemuThreadData *data;
|
|
unsigned tid;
|
|
};
|
|
|
|
/* Only valid for joinable threads. */
|
|
HANDLE qemu_thread_get_handle(struct QemuThread *thread);
|
|
|
|
#endif
|