mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 00:38:39 +08:00
Revert "SX(9): Implement with reader/writer lock"
This was accidentally committed.
This reverts commit cc7a8d87e7
.
This commit is contained in:
@@ -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__ */
|
||||
};
|
||||
|
||||
|
@@ -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.
|
||||
|
Reference in New Issue
Block a user