https://github.com/torvalds/linux
Raw File
Tip revision: 1ffaddd029c867d134a1dde39f540dcc8c52e274 authored by Linus Torvalds on 05 August 2018, 19:37:41 UTC
Linux 4.18-rc8
Tip revision: 1ffaddd
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