Lines Matching refs:sem
4 int init_rwsem(struct rw_semaphore *sem) in init_rwsem() argument
6 return pthread_rwlock_init(&sem->lock, NULL); in init_rwsem()
9 int exit_rwsem(struct rw_semaphore *sem) in exit_rwsem() argument
11 return pthread_rwlock_destroy(&sem->lock); in exit_rwsem()
14 int down_read(struct rw_semaphore *sem) in down_read() argument
16 return perf_singlethreaded ? 0 : pthread_rwlock_rdlock(&sem->lock); in down_read()
19 int up_read(struct rw_semaphore *sem) in up_read() argument
21 return perf_singlethreaded ? 0 : pthread_rwlock_unlock(&sem->lock); in up_read()
24 int down_write(struct rw_semaphore *sem) in down_write() argument
26 return perf_singlethreaded ? 0 : pthread_rwlock_wrlock(&sem->lock); in down_write()
29 int up_write(struct rw_semaphore *sem) in up_write() argument
31 return perf_singlethreaded ? 0 : pthread_rwlock_unlock(&sem->lock); in up_write()