RWLOCK(9): Add reader/writer lock implementation

This commit is contained in:
Sebastian Huber
2017-11-14 12:57:01 +01:00
parent 344b8e6fb4
commit 97a98f6cd7
8 changed files with 1027 additions and 64 deletions

View File

@@ -29,7 +29,7 @@
#ifndef _SYS__RWLOCK_H_
#define _SYS__RWLOCK_H_
#ifdef __rtems__
#include <machine/rtems-bsd-mutex.h>
#include <machine/rtems-bsd-rwlock.h>
#endif /* __rtems__ */
#include <machine/param.h>
@@ -48,7 +48,7 @@ struct rwlock {
#ifndef __rtems__
volatile uintptr_t rw_lock;
#else /* __rtems__ */
rtems_bsd_mutex mutex;
rtems_bsd_rwlock rwlock;
#endif /* __rtems__ */
};