]> git.proxmox.com Git - mirror_qemu.git/blobdiff - qemu-thread-posix.h
memory: Reintroduce dirty flag to optimize changes on disabled regions
[mirror_qemu.git] / qemu-thread-posix.h
index 7af371c3b7339736cf30041c9bfa516f0706da79..380bae209b05e5149f2876994761c79ed5cb3b82 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef __QEMU_THREAD_POSIX_H
 #define __QEMU_THREAD_POSIX_H 1
 #include "pthread.h"
+#include <semaphore.h>
 
 struct QemuMutex {
     pthread_mutex_t lock;
@@ -10,9 +11,18 @@ struct QemuCond {
     pthread_cond_t cond;
 };
 
+struct QemuSemaphore {
+#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__NetBSD__)
+    pthread_mutex_t lock;
+    pthread_cond_t cond;
+    int count;
+#else
+    sem_t sem;
+#endif
+};
+
 struct QemuThread {
     pthread_t thread;
 };
 
-void qemu_thread_signal(QemuThread *thread, int sig);
 #endif