summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include/rtems/posix
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-12-02 09:56:40 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-12-02 09:56:40 +0100
commitaadd318cd92e42839cf86260e1085f2953113180 (patch)
tree5a66481b0a69b73d19751377a9cfdc64ab14cb3c /cpukit/posix/include/rtems/posix
parentlibdebugger: Build for ARM's without a CP15. (diff)
downloadrtems-aadd318cd92e42839cf86260e1085f2953113180.tar.bz2
posix: Fix fall back spinlock implementation
Update #2674.
Diffstat (limited to 'cpukit/posix/include/rtems/posix')
-rw-r--r--cpukit/posix/include/rtems/posix/spinlockimpl.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/cpukit/posix/include/rtems/posix/spinlockimpl.h b/cpukit/posix/include/rtems/posix/spinlockimpl.h
index 36ef6677a0..c251e455e0 100644
--- a/cpukit/posix/include/rtems/posix/spinlockimpl.h
+++ b/cpukit/posix/include/rtems/posix/spinlockimpl.h
@@ -48,13 +48,13 @@ typedef struct {
} POSIX_Spinlock_Control;
#if !defined(POSIX_SPINLOCKS_ARE_SELF_CONTAINED)
-#if defined(RTEMS_SMP)
extern POSIX_Spinlock_Control _POSIX_Spinlock_Global;
+extern int _POSIX_Spinlock_Nest_level;
+
+#if defined(RTEMS_SMP)
extern uint32_t _POSIX_Spinlock_Owner;
#endif
-
-extern int _POSIX_Spinlock_Nest_level;
#endif
RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get(
@@ -63,12 +63,9 @@ RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get(
{
#if defined(POSIX_SPINLOCKS_ARE_SELF_CONTAINED)
return (POSIX_Spinlock_Control *) lock;
-#elif defined(RTEMS_SMP)
- (void) lock;
- return &_POSIX_Spinlock_Global;
#else
(void) lock;
- return NULL;
+ return &_POSIX_Spinlock_Global;
#endif
}