summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/Makefile.am
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-16 14:50:09 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-23 12:52:06 +0100
commitc42be504c92d76d2e06d0fc8ebd05fc913376d2d (patch)
tree259f8a712a6139f427888647955bc3c95480877e /cpukit/posix/Makefile.am
parent520e07db860b2f5bec5fe72fb46db2d382c52749 (diff)
downloadrtems-c42be504c92d76d2e06d0fc8ebd05fc913376d2d.tar.bz2
posix: Add self-contained pthread spinlock
Turn pthread_spinlock_t into a self-contained object. On uni-processor configurations, interrupts are disabled in the lock/trylock operations and the previous interrupt status is restored in the corresponding unlock operations. On SMP configurations, a ticket lock is a acquired and released in addition. The self-contained pthread_spinlock_t object is defined by Newlib in <sys/_pthreadtypes.h>. typedef struct { struct _Ticket_lock_Control _lock; __uint32_t _interrupt_state; } pthread_spinlock_t; This implementation is simple and efficient. However, this test case of the Linux Test Project would fail due to call of printf() and sleep() during spin lock ownership: https://github.com/linux-test-project/ltp/blob/master/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-2.c There is only limited support for profiling on SMP configurations. Delete CORE spinlock implementation. Update #2674.
Diffstat (limited to 'cpukit/posix/Makefile.am')
-rw-r--r--cpukit/posix/Makefile.am14
1 files changed, 7 insertions, 7 deletions
diff --git a/cpukit/posix/Makefile.am b/cpukit/posix/Makefile.am
index 5bf11c7713..d9a3437b13 100644
--- a/cpukit/posix/Makefile.am
+++ b/cpukit/posix/Makefile.am
@@ -21,6 +21,7 @@ include_rtems_posix_HEADERS += include/rtems/posix/keyimpl.h
include_rtems_posix_HEADERS += include/rtems/posix/config.h
include_rtems_posix_HEADERS += include/rtems/posix/posixapi.h
include_rtems_posix_HEADERS += include/rtems/posix/priorityimpl.h
+include_rtems_posix_HEADERS += include/rtems/posix/spinlockimpl.h
if HAS_PTHREADS
# include
@@ -52,8 +53,6 @@ include_rtems_posix_HEADERS += include/rtems/posix/barrier.h
include_rtems_posix_HEADERS += include/rtems/posix/barrierimpl.h
include_rtems_posix_HEADERS += include/rtems/posix/rwlock.h
include_rtems_posix_HEADERS += include/rtems/posix/rwlockimpl.h
-include_rtems_posix_HEADERS += include/rtems/posix/spinlock.h
-include_rtems_posix_HEADERS += include/rtems/posix/spinlockimpl.h
## src
libposix_a_SOURCES += src/aio_cancel.c src/aio_error.c src/aio_fsync.c \
@@ -168,6 +167,12 @@ libposix_a_SOURCES += src/sigaddset.c src/sigdelset.c src/sigfillset.c \
libposix_a_SOURCES += src/sigprocmask.c
+## SPINLOCK_C_FILES
+libposix_a_SOURCES += src/pspindestroy.c
+libposix_a_SOURCES += src/pspininit.c
+libposix_a_SOURCES += src/pspinlock.c
+libposix_a_SOURCES += src/pspinunlock.c
+
if HAS_PTHREADS
libposix_a_SOURCES += src/sigpending.c \
src/sigqueue.c src/sigsuspend.c src/sigtimedwait.c \
@@ -188,11 +193,6 @@ libposix_a_SOURCES += src/semaphore.c src/semaphorecreatesupp.c \
src/semopen.c src/sempost.c src/semtimedwait.c src/semtrywait.c \
src/semunlink.c src/semwait.c
-## SPINLOCK_C_FILES
-libposix_a_SOURCES += src/pspin.c src/pspindestroy.c src/pspininit.c \
- src/pspinlock.c src/pspintrylock.c \
- src/pspinunlock.c
-
## TIME_C_FILES
libposix_a_SOURCES += src/adjtime.c src/clockgetcpuclockid.c