Commit | Line | Data |
---|---|---|
07739b57 JA |
1 | #ifndef FIO_MUTEX_H |
2 | #define FIO_MUTEX_H | |
3 | ||
4 | #include <pthread.h> | |
5 | ||
6 | struct fio_sem { | |
7 | pthread_mutex_t lock; | |
8 | pthread_cond_t cond; | |
9 | unsigned int value; | |
10 | ||
f7c9e00e | 11 | int sem_fd; |
07739b57 JA |
12 | }; |
13 | ||
14 | extern struct fio_sem *fio_sem_init(int); | |
15 | extern void fio_sem_remove(struct fio_sem *); | |
16 | extern inline void fio_sem_down(struct fio_sem *); | |
17 | extern inline void fio_sem_up(struct fio_sem *sem); | |
18 | ||
19 | #endif |