fpu: Bound increment for scalbn
[qemu.git] / include / qemu / thread-posix.h
blobf3f47e426f3300dba6cef553653c3e67e1394a6b
1 #ifndef QEMU_THREAD_POSIX_H
2 #define QEMU_THREAD_POSIX_H
4 #include <pthread.h>
5 #include <semaphore.h>
7 typedef QemuMutex QemuRecMutex;
8 #define qemu_rec_mutex_destroy qemu_mutex_destroy
9 #define qemu_rec_mutex_lock qemu_mutex_lock
10 #define qemu_rec_mutex_trylock qemu_mutex_trylock
11 #define qemu_rec_mutex_unlock qemu_mutex_unlock
13 struct QemuMutex {
14 pthread_mutex_t lock;
15 bool initialized;
18 struct QemuCond {
19 pthread_cond_t cond;
20 bool initialized;
23 struct QemuSemaphore {
24 #ifndef CONFIG_SEM_TIMEDWAIT
25 pthread_mutex_t lock;
26 pthread_cond_t cond;
27 unsigned int count;
28 #else
29 sem_t sem;
30 #endif
31 bool initialized;
34 struct QemuEvent {
35 #ifndef __linux__
36 pthread_mutex_t lock;
37 pthread_cond_t cond;
38 #endif
39 unsigned value;
40 bool initialized;
43 struct QemuThread {
44 pthread_t thread;
47 #endif