Revert "SX(9): Implement with reader/writer lock"

This was accidentally committed.

This reverts commit cc7a8d87e7.
This commit is contained in:
Sebastian Huber
2017-11-17 10:49:31 +01:00
parent cc7a8d87e7
commit b5822c2a0a
3 changed files with 33 additions and 95 deletions

View File

@@ -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__ */
};

View File

@@ -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.