https://github.com/torvalds/linux
Raw File
Tip revision: 94f6f0550c625fab1f373bb86a6669b45e9748b3 authored by Linus Torvalds on 08 October 2023, 20:49:43 UTC
Linux 6.6-rc5
Tip revision: 94f6f05
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