Commit | Line | Data |
---|---|---|
1 | #ifndef FIO_RWLOCK_H | |
2 | #define FIO_RWLOCK_H | |
3 | ||
4 | #include <pthread.h> | |
5 | ||
6 | #define FIO_RWLOCK_MAGIC 0x52574c4fU | |
7 | ||
8 | struct fio_rwlock { | |
9 | pthread_rwlock_t lock; | |
10 | int magic; | |
11 | }; | |
12 | ||
13 | extern void fio_rwlock_read(struct fio_rwlock *); | |
14 | extern void fio_rwlock_write(struct fio_rwlock *); | |
15 | extern void fio_rwlock_unlock(struct fio_rwlock *); | |
16 | extern struct fio_rwlock *fio_rwlock_init(void); | |
17 | extern void fio_rwlock_remove(struct fio_rwlock *); | |
18 | ||
19 | #endif |