diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-11-15 11:49:09 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-11-16 09:02:28 +0100 |
commit | cc7a8d87e7307db738bf39ab1ca3ce1053f1c163 (patch) | |
tree | ed8612c3aa68f879b7bcba9da1b289d785caa71f /freebsd | |
parent | RWLOCK(9): Add reader/writer lock implementation (diff) | |
download | rtems-libbsd-cc7a8d87e7307db738bf39ab1ca3ce1053f1c163.tar.bz2 |
SX(9): Implement with reader/writer lock
Diffstat (limited to 'freebsd')
-rw-r--r-- | freebsd/sys/sys/_sx.h | 4 | ||||
-rw-r--r-- | freebsd/sys/sys/sx.h | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/freebsd/sys/sys/_sx.h b/freebsd/sys/sys/_sx.h index b07ac47a..b3bcd275 100644 --- a/freebsd/sys/sys/_sx.h +++ b/freebsd/sys/sys/_sx.h @@ -31,7 +31,7 @@ #ifndef _SYS__SX_H_ #define _SYS__SX_H_ #ifdef __rtems__ -#include <machine/rtems-bsd-mutex.h> +#include <machine/rtems-bsd-rwlock.h> #endif /* __rtems__ */ /* @@ -42,7 +42,7 @@ struct sx { #ifndef __rtems__ volatile uintptr_t sx_lock; #else /* __rtems__ */ - rtems_bsd_mutex mutex; + rtems_bsd_rwlock rwlock; #endif /* __rtems__ */ }; diff --git a/freebsd/sys/sys/sx.h b/freebsd/sys/sys/sx.h index 0c95df16..f8eba5e1 100644 --- a/freebsd/sys/sys/sx.h +++ b/freebsd/sys/sys/sx.h @@ -44,9 +44,6 @@ #ifdef __rtems__ #define SX_NOINLINE 1 -#define _sx_slock _bsd__sx_xlock -#define sx_try_slock_ _bsd_sx_try_xlock_ -#define _sx_sunlock _bsd__sx_xunlock #endif /* __rtems__ */ /* * In general, the sx locks and rwlocks use very similar algorithms. |