blob: c4b0d8edcc3e30e635b42085b095c4bb786d2343 [file] [log] [blame]
Jens Axboe07739b52007-03-08 20:25:46 +01001#ifndef FIO_MUTEX_H
2#define FIO_MUTEX_H
3
4#include <pthread.h>
5
6struct fio_sem {
7 pthread_mutex_t lock;
8 pthread_cond_t cond;
9 unsigned int value;
10
Jens Axboef7c9e002007-03-09 12:40:02 +010011 int sem_fd;
Jens Axboe07739b52007-03-08 20:25:46 +010012};
13
14extern struct fio_sem *fio_sem_init(int);
15extern void fio_sem_remove(struct fio_sem *);
16extern inline void fio_sem_down(struct fio_sem *);
17extern inline void fio_sem_up(struct fio_sem *sem);
18
19#endif