Lines Matching refs:sem
5 int init_rwsem(struct rw_semaphore *sem) in init_rwsem() argument
7 return pthread_rwlock_init(&sem->lock, NULL); in init_rwsem()
10 int exit_rwsem(struct rw_semaphore *sem) in exit_rwsem() argument
12 return pthread_rwlock_destroy(&sem->lock); in exit_rwsem()
15 int down_read(struct rw_semaphore *sem) in down_read() argument
17 return perf_singlethreaded ? 0 : pthread_rwlock_rdlock(&sem->lock); in down_read()
20 int up_read(struct rw_semaphore *sem) in up_read() argument
22 return perf_singlethreaded ? 0 : pthread_rwlock_unlock(&sem->lock); in up_read()
25 int down_write(struct rw_semaphore *sem) in down_write() argument
27 return perf_singlethreaded ? 0 : pthread_rwlock_wrlock(&sem->lock); in down_write()
30 int up_write(struct rw_semaphore *sem) in up_write() argument
32 return perf_singlethreaded ? 0 : pthread_rwlock_unlock(&sem->lock); in up_write()