https://github.com/torvalds/linux
Raw File
Tip revision: 4fe89d07dcc2804c8b562f6c7896a45643d34b2f authored by Linus Torvalds on 02 October 2022, 21:09:07 UTC
Linux 6.0
Tip revision: 4fe89d0
rwsem.h
#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 */
back to top