Linux Perf
rwsem.h
Go to the documentation of this file.
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 */
int init_rwsem(struct rw_semaphore *sem)
Definition: rwsem.c:4
pthread_rwlock_t lock
Definition: rwsem.h:7
int down_read(struct rw_semaphore *sem)
Definition: rwsem.c:14
int exit_rwsem(struct rw_semaphore *sem)
Definition: rwsem.c:9
int up_read(struct rw_semaphore *sem)
Definition: rwsem.c:19
int up_write(struct rw_semaphore *sem)
Definition: rwsem.c:29
int down_write(struct rw_semaphore *sem)
Definition: rwsem.c:24