Linux 5.1.15
[linux/fpc-iii.git] / tools / perf / util / rwsem.h
blob94565ad4d49485f5144344679855479e19fd4210
1 #ifndef _PERF_RWSEM_H
2 #define _PERF_RWSEM_H
4 #include <pthread.h>
6 struct rw_semaphore {
7 pthread_rwlock_t lock;
8 };
10 int init_rwsem(struct rw_semaphore *sem);
11 int exit_rwsem(struct rw_semaphore *sem);
13 int down_read(struct rw_semaphore *sem);
14 int up_read(struct rw_semaphore *sem);
16 int down_write(struct rw_semaphore *sem);
17 int up_write(struct rw_semaphore *sem);
19 #endif /* _PERF_RWSEM_H */