aboutsummaryrefslogtreecommitdiff
path: root/include/qemu/thread-posix.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/qemu/thread-posix.h')
-rw-r--r--include/qemu/thread-posix.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/qemu/thread-posix.h b/include/qemu/thread-posix.h
index cf8bc90..b792e6e 100644
--- a/include/qemu/thread-posix.h
+++ b/include/qemu/thread-posix.h
@@ -4,8 +4,6 @@
#include <pthread.h>
#include <semaphore.h>
-typedef QemuMutex QemuRecMutex;
-
struct QemuMutex {
pthread_mutex_t lock;
#ifdef CONFIG_DEBUG_MUTEX
@@ -15,6 +13,14 @@ struct QemuMutex {
bool initialized;
};
+/*
+ * QemuRecMutex cannot be a typedef of QemuMutex lest we have two
+ * compatible cases in _Generic. See qemu/lockable.h.
+ */
+typedef struct QemuRecMutex {
+ QemuMutex m;
+} QemuRecMutex;
+
struct QemuCond {
pthread_cond_t cond;
bool initialized;