summaryrefslogtreecommitdiffstats
path: root/freebsd
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-11-17 10:49:31 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-11-17 10:49:31 +0100
commitb5822c2a0a4240ac51251467d859b0fb91b36292 (patch)
tree279ba49b9f03b0f111ff5df771e9d4f3b3fd4feb /freebsd
parentSX(9): Implement with reader/writer lock (diff)
downloadrtems-libbsd-b5822c2a0a4240ac51251467d859b0fb91b36292.tar.bz2
Revert "SX(9): Implement with reader/writer lock"
This was accidentally committed. This reverts commit cc7a8d87e7307db738bf39ab1ca3ce1053f1c163.
Diffstat (limited to 'freebsd')
-rw-r--r--freebsd/sys/sys/_sx.h4
-rw-r--r--freebsd/sys/sys/sx.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/freebsd/sys/sys/_sx.h b/freebsd/sys/sys/_sx.h
index b3bcd275..b07ac47a 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-rwlock.h>
+#include <machine/rtems-bsd-mutex.h>
#endif /* __rtems__ */
/*
@@ -42,7 +42,7 @@ struct sx {
#ifndef __rtems__
volatile uintptr_t sx_lock;
#else /* __rtems__ */
- rtems_bsd_rwlock rwlock;
+ rtems_bsd_mutex mutex;
#endif /* __rtems__ */
};
diff --git a/freebsd/sys/sys/sx.h b/freebsd/sys/sys/sx.h
index f8eba5e1..0c95df16 100644
--- a/freebsd/sys/sys/sx.h
+++ b/freebsd/sys/sys/sx.h
@@ -44,6 +44,9 @@
#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.