mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
20 lines
393 B
C
20 lines
393 B
C
![]() |
#ifndef _PERF_RWSEM_H
|
||
|
#define _PERF_RWSEM_H
|
||
|
|
||
|
#include <pthread.h>
|
||
|
|
||
|
struct rw_semaphore {
|
||
|
pthread_rwlock_t lock;
|
||
|
};
|
||
|
|
||
|
int init_rwsem(struct rw_semaphore *sem);
|
||
|
int exit_rwsem(struct rw_semaphore *sem);
|
||
|
|
||
|
int down_read(struct rw_semaphore *sem);
|
||
|
int up_read(struct rw_semaphore *sem);
|
||
|
|
||
|
int down_write(struct rw_semaphore *sem);
|
||
|
int up_write(struct rw_semaphore *sem);
|
||
|
|
||
|
#endif /* _PERF_RWSEM_H */
|