Merge tag 'kvmarm-fixes-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / tools / perf / util / rwsem.h
1 #ifndef _PERF_RWSEM_H
2 #define _PERF_RWSEM_H
3
4 #include <pthread.h>
5
6 struct rw_semaphore {
7         pthread_rwlock_t lock;
8 };
9
10 int init_rwsem(struct rw_semaphore *sem);
11 int exit_rwsem(struct rw_semaphore *sem);
12
13 int down_read(struct rw_semaphore *sem);
14 int up_read(struct rw_semaphore *sem);
15
16 int down_write(struct rw_semaphore *sem);
17 int up_write(struct rw_semaphore *sem);
18
19 #endif /* _PERF_RWSEM_H */