RTEMS 6.1-rc1
rwsem.h
1#ifndef __LINUX_RWSEM_H__
2#define __LINUX_RWSEM_H__
3
4#include <pthread.h>
5
7 pthread_rwlock_t lock;
8};
9
10#define init_rwsem(rwsem) pthread_rwlock_init(&(rwsem)->lock, NULL)
11
12#define down_read(rwsem) pthread_rwlock_rdlock(&(rwsem)->lock)
13
14#define down_write(rwsem) pthread_rwlock_wrlock(&(rwsem)->lock)
15
16#define up_read(rwsem) pthread_rwlock_unlock(&(rwsem)->lock)
17
18#define up_write(rwsem) pthread_rwlock_unlock(&(rwsem)->lock)
19
20#endif /* __LINUX_RWSEM_H__ */
POSIX Threads Private Support.
Definition: rwsem.h:6