Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
at v5.8 19 lines 393 B view raw
1#ifndef _PERF_RWSEM_H 2#define _PERF_RWSEM_H 3 4#include <pthread.h> 5 6struct rw_semaphore { 7 pthread_rwlock_t lock; 8}; 9 10int init_rwsem(struct rw_semaphore *sem); 11int exit_rwsem(struct rw_semaphore *sem); 12 13int down_read(struct rw_semaphore *sem); 14int up_read(struct rw_semaphore *sem); 15 16int down_write(struct rw_semaphore *sem); 17int up_write(struct rw_semaphore *sem); 18 19#endif /* _PERF_RWSEM_H */