summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-17 14:34:05 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-18 09:58:57 +0200
commitf9d533a5f3205b77da40c160516fc8bc7585b36f (patch)
treef04120040c88733da6190dd11aafd97644419124
parentrtems: Create semaphore implementation header (diff)
downloadrtems-f9d533a5f3205b77da40c160516fc8bc7585b36f.tar.bz2
posix: Create mutex implementation header
Move implementation specific parts of mutex.h and mutex.inl into new header file muteximpl.h. The mutex.h contains now only the application visible API.
-rw-r--r--cpukit/libcsupport/src/resource_snapshot.c2
-rw-r--r--cpukit/posix/Makefile.am2
-rw-r--r--cpukit/posix/include/rtems/posix/mutex.h172
-rw-r--r--cpukit/posix/include/rtems/posix/muteximpl.h226
-rw-r--r--cpukit/posix/inline/rtems/posix/mutex.inl58
-rw-r--r--cpukit/posix/preinstall.am8
-rw-r--r--cpukit/posix/src/barrierattrdestroy.c2
-rw-r--r--cpukit/posix/src/cond.c2
-rw-r--r--cpukit/posix/src/condattrdestroy.c2
-rw-r--r--cpukit/posix/src/condattrgetpshared.c2
-rw-r--r--cpukit/posix/src/condattrinit.c2
-rw-r--r--cpukit/posix/src/condattrsetpshared.c2
-rw-r--r--cpukit/posix/src/condbroadcast.c2
-rw-r--r--cpukit/posix/src/conddefaultattributes.c2
-rw-r--r--cpukit/posix/src/conddestroy.c2
-rw-r--r--cpukit/posix/src/condget.c2
-rw-r--r--cpukit/posix/src/condinit.c2
-rw-r--r--cpukit/posix/src/condsignal.c2
-rw-r--r--cpukit/posix/src/condsignalsupp.c2
-rw-r--r--cpukit/posix/src/condtimedwait.c2
-rw-r--r--cpukit/posix/src/condwait.c2
-rw-r--r--cpukit/posix/src/condwaitsupp.c2
-rw-r--r--cpukit/posix/src/mutex.c2
-rw-r--r--cpukit/posix/src/mutexattrdestroy.c2
-rw-r--r--cpukit/posix/src/mutexattrgetprioceiling.c2
-rw-r--r--cpukit/posix/src/mutexattrgetprotocol.c2
-rw-r--r--cpukit/posix/src/mutexattrgetpshared.c2
-rw-r--r--cpukit/posix/src/mutexattrgettype.c2
-rw-r--r--cpukit/posix/src/mutexattrinit.c2
-rw-r--r--cpukit/posix/src/mutexattrsetprioceiling.c2
-rw-r--r--cpukit/posix/src/mutexattrsetprotocol.c2
-rw-r--r--cpukit/posix/src/mutexattrsetpshared.c2
-rw-r--r--cpukit/posix/src/mutexattrsettype.c2
-rw-r--r--cpukit/posix/src/mutexdestroy.c2
-rw-r--r--cpukit/posix/src/mutexget.c2
-rw-r--r--cpukit/posix/src/mutexgetprioceiling.c2
-rw-r--r--cpukit/posix/src/mutexinit.c2
-rw-r--r--cpukit/posix/src/mutexlock.c2
-rw-r--r--cpukit/posix/src/mutexlocksupp.c2
-rw-r--r--cpukit/posix/src/mutexsetprioceiling.c2
-rw-r--r--cpukit/posix/src/mutextimedlock.c2
-rw-r--r--cpukit/posix/src/mutextranslatereturncode.c2
-rw-r--r--cpukit/posix/src/mutextrylock.c2
-rw-r--r--cpukit/posix/src/mutexunlock.c2
-rw-r--r--cpukit/posix/src/rwlockattrdestroy.c2
-rw-r--r--cpukit/sapi/src/posixapi.c2
46 files changed, 276 insertions, 272 deletions
diff --git a/cpukit/libcsupport/src/resource_snapshot.c b/cpukit/libcsupport/src/resource_snapshot.c
index f44f2829d5..079b549b40 100644
--- a/cpukit/libcsupport/src/resource_snapshot.c
+++ b/cpukit/libcsupport/src/resource_snapshot.c
@@ -31,7 +31,7 @@
#include <rtems/posix/barrier.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/mqueue.h>
- #include <rtems/posix/mutex.h>
+ #include <rtems/posix/muteximpl.h>
#include <rtems/posix/key.h>
#include <rtems/posix/psignal.h>
#include <rtems/posix/pthread.h>
diff --git a/cpukit/posix/Makefile.am b/cpukit/posix/Makefile.am
index 78ea3f5443..f108f00d4c 100644
--- a/cpukit/posix/Makefile.am
+++ b/cpukit/posix/Makefile.am
@@ -31,6 +31,7 @@ include_rtems_posix_HEADERS += include/rtems/posix/config.h
include_rtems_posix_HEADERS += include/rtems/posix/key.h
include_rtems_posix_HEADERS += include/rtems/posix/mqueue.h
include_rtems_posix_HEADERS += include/rtems/posix/mutex.h
+include_rtems_posix_HEADERS += include/rtems/posix/muteximpl.h
include_rtems_posix_HEADERS += include/rtems/posix/posixapi.h
include_rtems_posix_HEADERS += include/rtems/posix/priority.h
include_rtems_posix_HEADERS += include/rtems/posix/psignal.h
@@ -48,7 +49,6 @@ include_rtems_posix_HEADERS += include/rtems/posix/spinlock.h
include_rtems_posix_HEADERS += inline/rtems/posix/cond.inl
include_rtems_posix_HEADERS += inline/rtems/posix/key.inl
include_rtems_posix_HEADERS += inline/rtems/posix/mqueue.inl
-include_rtems_posix_HEADERS += inline/rtems/posix/mutex.inl
include_rtems_posix_HEADERS += inline/rtems/posix/pthread.inl
include_rtems_posix_HEADERS += inline/rtems/posix/priority.inl
include_rtems_posix_HEADERS += inline/rtems/posix/semaphore.inl
diff --git a/cpukit/posix/include/rtems/posix/mutex.h b/cpukit/posix/include/rtems/posix/mutex.h
index f228644377..1cff3642f1 100644
--- a/cpukit/posix/include/rtems/posix/mutex.h
+++ b/cpukit/posix/include/rtems/posix/mutex.h
@@ -19,6 +19,9 @@
#ifndef _RTEMS_POSIX_MUTEX_H
#define _RTEMS_POSIX_MUTEX_H
+#include <rtems/score/coremutex.h>
+#include <pthread.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -33,9 +36,6 @@ extern "C" {
*/
/**@{**/
-#include <rtems/score/coremutex.h>
-#include <pthread.h>
-
/*
* Data Structure used to manage a POSIX mutex
*/
@@ -46,175 +46,11 @@ typedef struct {
CORE_mutex_Control Mutex;
} POSIX_Mutex_Control;
-/*
- * The following defines the information control block used to manage
- * this class of objects.
- */
-
-POSIX_EXTERN Objects_Information _POSIX_Mutex_Information;
-
-/*
- * The default mutex attributes structure.
- */
-
-POSIX_EXTERN pthread_mutexattr_t _POSIX_Mutex_Default_attributes;
-
-/*
- * @brief POSIX Mutex Manager Initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _POSIX_Mutex_Manager_initialization(void);
-
-/*
- * _POSIX_Mutex_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a mutexes control block from
- * the inactive chain of free mutexes control blocks.
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void );
-
-/*
- * _POSIX_Mutex_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a mutexes control block to the
- * inactive chain of free mutexes control blocks.
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free (
- POSIX_Mutex_Control *the_mutex
-);
-
-#if 0
-/*
- * _POSIX_Mutex_Get
- *
- * DESCRIPTION:
- *
- * This function maps mutexes IDs to mutexes control blocks.
- * If ID corresponds to a local mutexes, then it returns
- * the_mutex control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the mutexes ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_mutex is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_mutex is undefined.
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Get (
- Objects_Id *id,
- Objects_Locations *location
-);
-
-/*
- * _POSIX_Mutex_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_mutex is NULL and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE bool _POSIX_Mutex_Is_null (
- POSIX_Mutex_Control *the_mutex
-);
-#endif
-
-/*
- * _POSIX_Mutex_Lock_support
- *
- * DESCRIPTION:
- *
- * A support routine which implements guts of the blocking, non-blocking, and
- * timed wait version of mutex lock.
- */
-
-int _POSIX_Mutex_Lock_support(
- pthread_mutex_t *mutex,
- bool blocking,
- Watchdog_Interval timeout
-);
-
-/**
- * @brief Convert core mutex status codes into the appropriate POSIX status
- * values.
- *
- * DESCRIPTION:
- *
- * A support routine which converts core mutex status codes into the
- * appropriate POSIX status values.
- *
- * @param[in] the_mutex_status is the mutex status code to translate
- *
- * @retval 0 Mutex status code indicates the operation completed successfully.
- * @retval EBUSY Mutex status code indicates that the operation unable to
- * complete immediately because the resource was unavailable.
- * @retval EDEADLK Mutex status code indicates that an attempt was made to
- * relock a mutex for which nesting is not configured.
- * @retval EPERM Mutex status code indicates that an attempt was made to
- * release a mutex by a thread other than the thread which locked it.
- * @retval EINVAL Mutex status code indicates that the thread was blocked
- * waiting for an operation to complete and the mutex was deleted.
- * @retval ETIMEDOUT Mutex status code indicates that the calling task was
- * willing to block but the operation was unable to complete within the time
- * allotted because the resource never became available.
- */
-
-int _POSIX_Mutex_Translate_core_mutex_return_code(
- CORE_mutex_Status the_mutex_status
-);
-
-
-/*
- * _POSIX_Mutex_Get
- *
- * DESCRIPTION:
- *
- * A support routine which translates the mutex id into a local pointer.
- * As a side-effect, it may create the mutex.
- *
- * NOTE:
- *
- * This version of the method uses a dispatching critical section.
- */
-
-POSIX_Mutex_Control *_POSIX_Mutex_Get (
- pthread_mutex_t *mutex,
- Objects_Locations *location
-);
-
-/*
- * _POSIX_Mutex_Get
- *
- * DESCRIPTION:
- *
- * A support routine which translates the mutex id into a local pointer.
- * As a side-effect, it may create the mutex.
- *
- * NOTE:
- *
- * This version of the method uses an interrupt critical section.
- */
-
-POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
- pthread_mutex_t *mutex,
- Objects_Locations *location,
- ISR_Level *level
-);
-
-#include <rtems/posix/mutex.inl>
+/** @} */
#ifdef __cplusplus
}
#endif
-/** @} */
-
#endif
/* end of include file */
diff --git a/cpukit/posix/include/rtems/posix/muteximpl.h b/cpukit/posix/include/rtems/posix/muteximpl.h
new file mode 100644
index 0000000000..27ed0c7fb0
--- /dev/null
+++ b/cpukit/posix/include/rtems/posix/muteximpl.h
@@ -0,0 +1,226 @@
+/**
+ * @file
+ *
+ * @brief Private Inlined Routines for POSIX Mutex's.
+ *
+ * This include file contains the static inline implementation of the private
+ * inlined routines for POSIX mutex's.
+ */
+
+/* COPYRIGHT (c) 1989-2011.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#include <rtems/posix/mutex.h>
+
+#ifndef _RTEMS_POSIX_MUTEXIMPL_H
+#define _RTEMS_POSIX_MUTEXIMPL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The following defines the information control block used to manage
+ * this class of objects.
+ */
+
+POSIX_EXTERN Objects_Information _POSIX_Mutex_Information;
+
+/*
+ * The default mutex attributes structure.
+ */
+
+POSIX_EXTERN pthread_mutexattr_t _POSIX_Mutex_Default_attributes;
+
+/*
+ * @brief POSIX Mutex Manager Initialization
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs the initialization necessary for this manager.
+ */
+
+void _POSIX_Mutex_Manager_initialization(void);
+
+/*
+ * _POSIX_Mutex_Allocate
+ *
+ * DESCRIPTION:
+ *
+ * This function allocates a mutexes control block from
+ * the inactive chain of free mutexes control blocks.
+ */
+
+RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void );
+
+/*
+ * _POSIX_Mutex_Free
+ *
+ * DESCRIPTION:
+ *
+ * This routine frees a mutexes control block to the
+ * inactive chain of free mutexes control blocks.
+ */
+
+RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free (
+ POSIX_Mutex_Control *the_mutex
+);
+
+#if 0
+/*
+ * _POSIX_Mutex_Get
+ *
+ * DESCRIPTION:
+ *
+ * This function maps mutexes IDs to mutexes control blocks.
+ * If ID corresponds to a local mutexes, then it returns
+ * the_mutex control pointer which maps to ID and location
+ * is set to OBJECTS_LOCAL. if the mutexes ID is global and
+ * resides on a remote node, then location is set to OBJECTS_REMOTE,
+ * and the_mutex is undefined. Otherwise, location is set
+ * to OBJECTS_ERROR and the_mutex is undefined.
+ */
+
+RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Get (
+ Objects_Id *id,
+ Objects_Locations *location
+);
+
+/*
+ * _POSIX_Mutex_Is_null
+ *
+ * DESCRIPTION:
+ *
+ * This function returns TRUE if the_mutex is NULL and FALSE otherwise.
+ */
+
+RTEMS_INLINE_ROUTINE bool _POSIX_Mutex_Is_null (
+ POSIX_Mutex_Control *the_mutex
+);
+#endif
+
+/*
+ * _POSIX_Mutex_Lock_support
+ *
+ * DESCRIPTION:
+ *
+ * A support routine which implements guts of the blocking, non-blocking, and
+ * timed wait version of mutex lock.
+ */
+
+int _POSIX_Mutex_Lock_support(
+ pthread_mutex_t *mutex,
+ bool blocking,
+ Watchdog_Interval timeout
+);
+
+/**
+ * @brief Convert core mutex status codes into the appropriate POSIX status
+ * values.
+ *
+ * DESCRIPTION:
+ *
+ * A support routine which converts core mutex status codes into the
+ * appropriate POSIX status values.
+ *
+ * @param[in] the_mutex_status is the mutex status code to translate
+ *
+ * @retval 0 Mutex status code indicates the operation completed successfully.
+ * @retval EBUSY Mutex status code indicates that the operation unable to
+ * complete immediately because the resource was unavailable.
+ * @retval EDEADLK Mutex status code indicates that an attempt was made to
+ * relock a mutex for which nesting is not configured.
+ * @retval EPERM Mutex status code indicates that an attempt was made to
+ * release a mutex by a thread other than the thread which locked it.
+ * @retval EINVAL Mutex status code indicates that the thread was blocked
+ * waiting for an operation to complete and the mutex was deleted.
+ * @retval ETIMEDOUT Mutex status code indicates that the calling task was
+ * willing to block but the operation was unable to complete within the time
+ * allotted because the resource never became available.
+ */
+
+int _POSIX_Mutex_Translate_core_mutex_return_code(
+ CORE_mutex_Status the_mutex_status
+);
+
+
+/*
+ * _POSIX_Mutex_Get
+ *
+ * DESCRIPTION:
+ *
+ * A support routine which translates the mutex id into a local pointer.
+ * As a side-effect, it may create the mutex.
+ *
+ * NOTE:
+ *
+ * This version of the method uses a dispatching critical section.
+ */
+
+POSIX_Mutex_Control *_POSIX_Mutex_Get (
+ pthread_mutex_t *mutex,
+ Objects_Locations *location
+);
+
+/*
+ * _POSIX_Mutex_Get
+ *
+ * DESCRIPTION:
+ *
+ * A support routine which translates the mutex id into a local pointer.
+ * As a side-effect, it may create the mutex.
+ *
+ * NOTE:
+ *
+ * This version of the method uses an interrupt critical section.
+ */
+
+POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
+ pthread_mutex_t *mutex,
+ Objects_Locations *location,
+ ISR_Level *level
+);
+
+/*
+ * _POSIX_Mutex_Allocate
+ */
+
+RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void )
+{
+ return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information );
+}
+
+/*
+ * _POSIX_Mutex_Free
+ */
+
+RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free (
+ POSIX_Mutex_Control *the_mutex
+)
+{
+ _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object );
+}
+
+/*
+ * _POSIX_Mutex_Is_null
+ */
+
+RTEMS_INLINE_ROUTINE bool _POSIX_Mutex_Is_null (
+ POSIX_Mutex_Control *the_mutex
+)
+{
+ return !the_mutex;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
+
diff --git a/cpukit/posix/inline/rtems/posix/mutex.inl b/cpukit/posix/inline/rtems/posix/mutex.inl
deleted file mode 100644
index e5c68016bd..0000000000
--- a/cpukit/posix/inline/rtems/posix/mutex.inl
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * @file
- *
- * @brief Private Inlined Routines for POSIX Mutex's.
- *
- * This include file contains the static inline implementation of the private
- * inlined routines for POSIX mutex's.
- */
-
-/* COPYRIGHT (c) 1989-2011.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
-
-#ifndef _RTEMS_POSIX_MUTEX_H
-# error "Never use <rtems/posix/mutex.inl> directly; include <rtems/posix/mutex.h> instead."
-#endif
-
-#ifndef _RTEMS_POSIX_MUTEX_INL
-#define _RTEMS_POSIX_MUTEX_INL
-
-/*
- * _POSIX_Mutex_Allocate
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void )
-{
- return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information );
-}
-
-/*
- * _POSIX_Mutex_Free
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free (
- POSIX_Mutex_Control *the_mutex
-)
-{
- _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object );
-}
-
-/*
- * _POSIX_Mutex_Is_null
- */
-
-RTEMS_INLINE_ROUTINE bool _POSIX_Mutex_Is_null (
- POSIX_Mutex_Control *the_mutex
-)
-{
- return !the_mutex;
-}
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/preinstall.am b/cpukit/posix/preinstall.am
index a9f6ebbffa..74ceb42c14 100644
--- a/cpukit/posix/preinstall.am
+++ b/cpukit/posix/preinstall.am
@@ -68,6 +68,10 @@ $(PROJECT_INCLUDE)/rtems/posix/mutex.h: include/rtems/posix/mutex.h $(PROJECT_IN
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/mutex.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/mutex.h
+$(PROJECT_INCLUDE)/rtems/posix/muteximpl.h: include/rtems/posix/muteximpl.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/muteximpl.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/muteximpl.h
+
$(PROJECT_INCLUDE)/rtems/posix/posixapi.h: include/rtems/posix/posixapi.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/posixapi.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/posixapi.h
@@ -132,10 +136,6 @@ $(PROJECT_INCLUDE)/rtems/posix/mqueue.inl: inline/rtems/posix/mqueue.inl $(PROJE
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/mqueue.inl
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/mqueue.inl
-$(PROJECT_INCLUDE)/rtems/posix/mutex.inl: inline/rtems/posix/mutex.inl $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/mutex.inl
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/mutex.inl
-
$(PROJECT_INCLUDE)/rtems/posix/pthread.inl: inline/rtems/posix/pthread.inl $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/pthread.inl
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/pthread.inl
diff --git a/cpukit/posix/src/barrierattrdestroy.c b/cpukit/posix/src/barrierattrdestroy.c
index 1e3cb17ae3..1c2ed06116 100644
--- a/cpukit/posix/src/barrierattrdestroy.c
+++ b/cpukit/posix/src/barrierattrdestroy.c
@@ -27,7 +27,7 @@
#include <rtems/score/watchdog.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
/*
* Barrier Initialization Attributes
diff --git a/cpukit/posix/src/cond.c b/cpukit/posix/src/cond.c
index d2f3b81618..24bb4a440f 100644
--- a/cpukit/posix/src/cond.c
+++ b/cpukit/posix/src/cond.c
@@ -29,7 +29,7 @@
#include <rtems/score/watchdog.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
/*
* _POSIX_Condition_variables_Manager_initialization
diff --git a/cpukit/posix/src/condattrdestroy.c b/cpukit/posix/src/condattrdestroy.c
index 3c54fcb3a0..128138fcc6 100644
--- a/cpukit/posix/src/condattrdestroy.c
+++ b/cpukit/posix/src/condattrdestroy.c
@@ -27,7 +27,7 @@
#include <rtems/score/watchdog.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
/*
* 11.4.1 Condition Variable Initialization Attributes,
diff --git a/cpukit/posix/src/condattrgetpshared.c b/cpukit/posix/src/condattrgetpshared.c
index 080253d0ed..e0868e1f86 100644
--- a/cpukit/posix/src/condattrgetpshared.c
+++ b/cpukit/posix/src/condattrgetpshared.c
@@ -27,7 +27,7 @@
#include <rtems/score/watchdog.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
/**
* 11.4.1 Condition Variable Initialization Attributes,
diff --git a/cpukit/posix/src/condattrinit.c b/cpukit/posix/src/condattrinit.c
index edd7e7b5d2..0d956c4398 100644
--- a/cpukit/posix/src/condattrinit.c
+++ b/cpukit/posix/src/condattrinit.c
@@ -27,7 +27,7 @@
#include <rtems/score/watchdog.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
/*
* 11.4.1 Condition Variable Initialization Attributes,
diff --git a/cpukit/posix/src/condattrsetpshared.c b/cpukit/posix/src/condattrsetpshared.c
index b38782a6f4..7ef820cf98 100644
--- a/cpukit/posix/src/condattrsetpshared.c
+++ b/cpukit/posix/src/condattrsetpshared.c
@@ -27,7 +27,7 @@
#include <rtems/score/watchdog.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
/*
* 11.4.1 Condition Variable Initialization Attributes,
diff --git a/cpukit/posix/src/condbroadcast.c b/cpukit/posix/src/condbroadcast.c
index 7ae1eade2e..f0bd905f05 100644
--- a/cpukit/posix/src/condbroadcast.c
+++ b/cpukit/posix/src/condbroadcast.c
@@ -27,7 +27,7 @@
#include <rtems/score/watchdog.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
/**
* 11.4.3 Broadcasting and Signaling a Condition, P1003.1c/Draft 10, p. 101
diff --git a/cpukit/posix/src/conddefaultattributes.c b/cpukit/posix/src/conddefaultattributes.c
index d7a4545a34..92c691f9a2 100644
--- a/cpukit/posix/src/conddefaultattributes.c
+++ b/cpukit/posix/src/conddefaultattributes.c
@@ -27,7 +27,7 @@
#include <rtems/score/watchdog.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
/*
* The default condition variable attributes structure.
diff --git a/cpukit/posix/src/conddestroy.c b/cpukit/posix/src/conddestroy.c
index 157049c95b..161acbecf6 100644
--- a/cpukit/posix/src/conddestroy.c
+++ b/cpukit/posix/src/conddestroy.c
@@ -27,7 +27,7 @@
#include <rtems/score/watchdog.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
/**
* 11.4.2 Initializing and Destroying a Condition Variable,
diff --git a/cpukit/posix/src/condget.c b/cpukit/posix/src/condget.c
index 5682020d4e..4959d556d8 100644
--- a/cpukit/posix/src/condget.c
+++ b/cpukit/posix/src/condget.c
@@ -20,7 +20,7 @@
#include <rtems/score/watchdog.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
diff --git a/cpukit/posix/src/condinit.c b/cpukit/posix/src/condinit.c
index 4123510ec2..3a16d8cdd4 100644
--- a/cpukit/posix/src/condinit.c
+++ b/cpukit/posix/src/condinit.c
@@ -27,7 +27,7 @@
#include <rtems/score/watchdog.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
/**
* 11.4.2 Initializing and Destroying a Condition Variable,
diff --git a/cpukit/posix/src/condsignal.c b/cpukit/posix/src/condsignal.c
index c9ff936bfd..02c9200642 100644
--- a/cpukit/posix/src/condsignal.c
+++ b/cpukit/posix/src/condsignal.c
@@ -27,7 +27,7 @@
#include <rtems/score/watchdog.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
/**
* 11.4.3 Broadcasting and Signaling a Condition, P1003.1c/Draft 10, p. 101
diff --git a/cpukit/posix/src/condsignalsupp.c b/cpukit/posix/src/condsignalsupp.c
index 376c1a51c1..dae64948d8 100644
--- a/cpukit/posix/src/condsignalsupp.c
+++ b/cpukit/posix/src/condsignalsupp.c
@@ -27,7 +27,7 @@
#include <rtems/score/watchdog.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
/*
* _POSIX_Condition_variables_Signal_support
diff --git a/cpukit/posix/src/condtimedwait.c b/cpukit/posix/src/condtimedwait.c
index a78cb1ae5e..0ddeecfce8 100644
--- a/cpukit/posix/src/condtimedwait.c
+++ b/cpukit/posix/src/condtimedwait.c
@@ -27,7 +27,7 @@
#include <rtems/score/watchdog.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
/*
* 11.4.4 Waiting on a Condition, P1003.1c/Draft 10, p. 105
diff --git a/cpukit/posix/src/condwait.c b/cpukit/posix/src/condwait.c
index b50fb33592..e6382bf348 100644
--- a/cpukit/posix/src/condwait.c
+++ b/cpukit/posix/src/condwait.c
@@ -27,7 +27,7 @@
#include <rtems/score/watchdog.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
/*
* 11.4.4 Waiting on a Condition, P1003.1c/Draft 10, p. 105
diff --git a/cpukit/posix/src/condwaitsupp.c b/cpukit/posix/src/condwaitsupp.c
index 53a0830ff7..b29010784f 100644
--- a/cpukit/posix/src/condwaitsupp.c
+++ b/cpukit/posix/src/condwaitsupp.c
@@ -27,7 +27,7 @@
#include <rtems/score/watchdog.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
int _POSIX_Condition_variables_Wait_support(
pthread_cond_t *cond,
diff --git a/cpukit/posix/src/mutex.c b/cpukit/posix/src/mutex.c
index c6026e08d7..860588f5ef 100644
--- a/cpukit/posix/src/mutex.c
+++ b/cpukit/posix/src/mutex.c
@@ -29,7 +29,7 @@
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#endif
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexattrdestroy.c b/cpukit/posix/src/mutexattrdestroy.c
index 5573b7284f..c4e4d1baf4 100644
--- a/cpukit/posix/src/mutexattrdestroy.c
+++ b/cpukit/posix/src/mutexattrdestroy.c
@@ -24,7 +24,7 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexattrgetprioceiling.c b/cpukit/posix/src/mutexattrgetprioceiling.c
index 1ce6c692ca..5a805f670b 100644
--- a/cpukit/posix/src/mutexattrgetprioceiling.c
+++ b/cpukit/posix/src/mutexattrgetprioceiling.c
@@ -24,7 +24,7 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexattrgetprotocol.c b/cpukit/posix/src/mutexattrgetprotocol.c
index 59fe109041..5fb494543a 100644
--- a/cpukit/posix/src/mutexattrgetprotocol.c
+++ b/cpukit/posix/src/mutexattrgetprotocol.c
@@ -24,7 +24,7 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexattrgetpshared.c b/cpukit/posix/src/mutexattrgetpshared.c
index 6ddba3a320..d87232599f 100644
--- a/cpukit/posix/src/mutexattrgetpshared.c
+++ b/cpukit/posix/src/mutexattrgetpshared.c
@@ -24,7 +24,7 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexattrgettype.c b/cpukit/posix/src/mutexattrgettype.c
index 365defc787..5baaf2a74d 100644
--- a/cpukit/posix/src/mutexattrgettype.c
+++ b/cpukit/posix/src/mutexattrgettype.c
@@ -24,7 +24,7 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexattrinit.c b/cpukit/posix/src/mutexattrinit.c
index 64f077b103..7cd1ca6beb 100644
--- a/cpukit/posix/src/mutexattrinit.c
+++ b/cpukit/posix/src/mutexattrinit.c
@@ -24,7 +24,7 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexattrsetprioceiling.c b/cpukit/posix/src/mutexattrsetprioceiling.c
index 69e1f91157..35ef93e461 100644
--- a/cpukit/posix/src/mutexattrsetprioceiling.c
+++ b/cpukit/posix/src/mutexattrsetprioceiling.c
@@ -24,7 +24,7 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexattrsetprotocol.c b/cpukit/posix/src/mutexattrsetprotocol.c
index c32655025e..50ce247253 100644
--- a/cpukit/posix/src/mutexattrsetprotocol.c
+++ b/cpukit/posix/src/mutexattrsetprotocol.c
@@ -24,7 +24,7 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexattrsetpshared.c b/cpukit/posix/src/mutexattrsetpshared.c
index a97265f2df..a3a0963c8a 100644
--- a/cpukit/posix/src/mutexattrsetpshared.c
+++ b/cpukit/posix/src/mutexattrsetpshared.c
@@ -24,7 +24,7 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexattrsettype.c b/cpukit/posix/src/mutexattrsettype.c
index 024f6e6b1f..58aad0b965 100644
--- a/cpukit/posix/src/mutexattrsettype.c
+++ b/cpukit/posix/src/mutexattrsettype.c
@@ -24,7 +24,7 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexdestroy.c b/cpukit/posix/src/mutexdestroy.c
index 27ebde0b97..55a3abb776 100644
--- a/cpukit/posix/src/mutexdestroy.c
+++ b/cpukit/posix/src/mutexdestroy.c
@@ -24,7 +24,7 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexget.c b/cpukit/posix/src/mutexget.c
index e8b84eaf3e..85c620a974 100644
--- a/cpukit/posix/src/mutexget.c
+++ b/cpukit/posix/src/mutexget.c
@@ -26,7 +26,7 @@
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#endif
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
/*
diff --git a/cpukit/posix/src/mutexgetprioceiling.c b/cpukit/posix/src/mutexgetprioceiling.c
index 450a9daeba..1e441a2f8e 100644
--- a/cpukit/posix/src/mutexgetprioceiling.c
+++ b/cpukit/posix/src/mutexgetprioceiling.c
@@ -27,7 +27,7 @@
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#endif
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexinit.c b/cpukit/posix/src/mutexinit.c
index b955847e6e..44ecad3277 100644
--- a/cpukit/posix/src/mutexinit.c
+++ b/cpukit/posix/src/mutexinit.c
@@ -24,7 +24,7 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexlock.c b/cpukit/posix/src/mutexlock.c
index 6777048424..cfcb460294 100644
--- a/cpukit/posix/src/mutexlock.c
+++ b/cpukit/posix/src/mutexlock.c
@@ -27,7 +27,7 @@
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#endif
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexlocksupp.c b/cpukit/posix/src/mutexlocksupp.c
index 22f6748836..8d6484a6df 100644
--- a/cpukit/posix/src/mutexlocksupp.c
+++ b/cpukit/posix/src/mutexlocksupp.c
@@ -27,7 +27,7 @@
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#endif
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexsetprioceiling.c b/cpukit/posix/src/mutexsetprioceiling.c
index e50567d561..86ad1345db 100644
--- a/cpukit/posix/src/mutexsetprioceiling.c
+++ b/cpukit/posix/src/mutexsetprioceiling.c
@@ -24,7 +24,7 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutextimedlock.c b/cpukit/posix/src/mutextimedlock.c
index e5d6019d55..532f1bd9bf 100644
--- a/cpukit/posix/src/mutextimedlock.c
+++ b/cpukit/posix/src/mutextimedlock.c
@@ -27,7 +27,7 @@
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#endif
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutextranslatereturncode.c b/cpukit/posix/src/mutextranslatereturncode.c
index 8c2d9af8ce..aa2fb80d96 100644
--- a/cpukit/posix/src/mutextranslatereturncode.c
+++ b/cpukit/posix/src/mutextranslatereturncode.c
@@ -23,7 +23,7 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
static int _POSIX_Mutex_Return_codes[CORE_MUTEX_STATUS_LAST + 1] = {
0, /* CORE_MUTEX_STATUS_SUCCESSFUL */
diff --git a/cpukit/posix/src/mutextrylock.c b/cpukit/posix/src/mutextrylock.c
index a354c8089d..75d04828e1 100644
--- a/cpukit/posix/src/mutextrylock.c
+++ b/cpukit/posix/src/mutextrylock.c
@@ -27,7 +27,7 @@
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#endif
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexunlock.c b/cpukit/posix/src/mutexunlock.c
index 3804ec6c7e..50e16b42d6 100644
--- a/cpukit/posix/src/mutexunlock.c
+++ b/cpukit/posix/src/mutexunlock.c
@@ -27,7 +27,7 @@
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#endif
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/rwlockattrdestroy.c b/cpukit/posix/src/rwlockattrdestroy.c
index 925ff35e68..9bc810c6e8 100644
--- a/cpukit/posix/src/rwlockattrdestroy.c
+++ b/cpukit/posix/src/rwlockattrdestroy.c
@@ -27,7 +27,7 @@
#include <rtems/score/watchdog.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
/*
* RWLock Initialization Attributes
diff --git a/cpukit/sapi/src/posixapi.c b/cpukit/sapi/src/posixapi.c
index bd7aabd3b4..158180991f 100644
--- a/cpukit/sapi/src/posixapi.c
+++ b/cpukit/sapi/src/posixapi.c
@@ -33,7 +33,7 @@
#include <rtems/posix/config.h>
#include <rtems/posix/key.h>
#include <rtems/posix/mqueue.h>
-#include <rtems/posix/mutex.h>
+#include <rtems/posix/muteximpl.h>
#include <rtems/posix/posixapi.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/psignalimpl.h>