repo.or.cz
/
qemu
/
ar7.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Use #include "..." for our own headers, <...> for others
[qemu/ar7.git]
/
include
/
qemu
/
thread-posix.h
blob
24f84908b0092ac6ca5b3da7608f54a52d48aa7a
1
#ifndef __QEMU_THREAD_POSIX_H
2
#define __QEMU_THREAD_POSIX_H 1
3
4
#include <pthread.h>
5
#include <semaphore.h>
6
7
struct
QemuMutex
{
8
pthread_mutex_t lock
;
9
};
10
11
struct
QemuCond
{
12
pthread_cond_t cond
;
13
};
14
15
struct
QemuSemaphore
{
16
#if defined(__APPLE__) || defined(__NetBSD__)
17
pthread_mutex_t lock
;
18
pthread_cond_t cond
;
19
unsigned int
count
;
20
#else
21
sem_t sem
;
22
#endif
23
};
24
25
struct
QemuEvent
{
26
#ifndef __linux__
27
pthread_mutex_t lock
;
28
pthread_cond_t cond
;
29
#endif
30
unsigned
value
;
31
};
32
33
struct
QemuThread
{
34
pthread_t thread
;
35
};
36
37
#endif