qemu-e2k/include/qemu/thread-win32.h
Richard Henderson 5d63bd5aad util: Use real functions for thread-posix QemuRecMutex
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: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210614233143.1221879-4-richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-06-16 15:03:26 +02:00

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