[PATCH 2/9] posix: Create mutex implementation header
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Jul 17 14:18:53 UTC 2013
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.
---
cpukit/libcsupport/src/resource_snapshot.c | 2 +-
cpukit/posix/Makefile.am | 2 +-
cpukit/posix/include/rtems/posix/mutex.h | 172 +-------------------
cpukit/posix/include/rtems/posix/muteximpl.h | 226 ++++++++++++++++++++++++++
cpukit/posix/inline/rtems/posix/mutex.inl | 58 -------
cpukit/posix/preinstall.am | 8 +-
cpukit/posix/src/barrierattrdestroy.c | 2 +-
cpukit/posix/src/cond.c | 2 +-
cpukit/posix/src/condattrdestroy.c | 2 +-
cpukit/posix/src/condattrgetpshared.c | 2 +-
cpukit/posix/src/condattrinit.c | 2 +-
cpukit/posix/src/condattrsetpshared.c | 2 +-
cpukit/posix/src/condbroadcast.c | 2 +-
cpukit/posix/src/conddefaultattributes.c | 2 +-
cpukit/posix/src/conddestroy.c | 2 +-
cpukit/posix/src/condget.c | 2 +-
cpukit/posix/src/condinit.c | 2 +-
cpukit/posix/src/condsignal.c | 2 +-
cpukit/posix/src/condsignalsupp.c | 2 +-
cpukit/posix/src/condtimedwait.c | 2 +-
cpukit/posix/src/condwait.c | 2 +-
cpukit/posix/src/condwaitsupp.c | 2 +-
cpukit/posix/src/mutex.c | 2 +-
cpukit/posix/src/mutexattrdestroy.c | 2 +-
cpukit/posix/src/mutexattrgetprioceiling.c | 2 +-
cpukit/posix/src/mutexattrgetprotocol.c | 2 +-
cpukit/posix/src/mutexattrgetpshared.c | 2 +-
cpukit/posix/src/mutexattrgettype.c | 2 +-
cpukit/posix/src/mutexattrinit.c | 2 +-
cpukit/posix/src/mutexattrsetprioceiling.c | 2 +-
cpukit/posix/src/mutexattrsetprotocol.c | 2 +-
cpukit/posix/src/mutexattrsetpshared.c | 2 +-
cpukit/posix/src/mutexattrsettype.c | 2 +-
cpukit/posix/src/mutexdestroy.c | 2 +-
cpukit/posix/src/mutexget.c | 2 +-
cpukit/posix/src/mutexgetprioceiling.c | 2 +-
cpukit/posix/src/mutexinit.c | 2 +-
cpukit/posix/src/mutexlock.c | 2 +-
cpukit/posix/src/mutexlocksupp.c | 2 +-
cpukit/posix/src/mutexsetprioceiling.c | 2 +-
cpukit/posix/src/mutextimedlock.c | 2 +-
cpukit/posix/src/mutextranslatereturncode.c | 2 +-
cpukit/posix/src/mutextrylock.c | 2 +-
cpukit/posix/src/mutexunlock.c | 2 +-
cpukit/posix/src/rwlockattrdestroy.c | 2 +-
cpukit/sapi/src/posixapi.c | 2 +-
46 files changed, 276 insertions(+), 272 deletions(-)
create mode 100644 cpukit/posix/include/rtems/posix/muteximpl.h
delete mode 100644 cpukit/posix/inline/rtems/posix/mutex.inl
diff --git a/cpukit/libcsupport/src/resource_snapshot.c b/cpukit/libcsupport/src/resource_snapshot.c
index f44f282..079b549 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 78ea3f5..f108f00 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 f228644..1cff364 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 0000000..27ed0c7
--- /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 e5c6801..0000000
--- 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 a9f6ebb..74ceb42 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 1e3cb17..1c2ed06 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 d2f3b81..24bb4a4 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 3c54fcb..128138f 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 080253d..e0868e1 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 edd7e7b..0d956c4 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 b38782a..7ef820c 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 7ae1ead..f0bd905 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 d7a4545..92c691f 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 157049c..161acbe 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 5682020..4959d55 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 4123510..3a16d8c 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 c9ff936..02c9200 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 376c1a5..dae6494 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 a78cb1a..0ddeecf 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 b50fb33..e6382bf 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 53a0830..b290107 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 c6026e0..860588f 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 5573b72..c4e4d1b 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 1ce6c69..5a805f6 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 59fe109..5fb4945 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 6ddba3a..d872325 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 365defc..5baaf2a 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 64f077b..7cd1ca6 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 69e1f91..35ef93e 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 c326550..50ce247 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 a97265f..a3a0963 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 024f6e6..58aad0b 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 27ebde0..55a3abb 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 e8b84ea..85c620a 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 450a9da..1e441a2 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 b955847..44ecad3 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 6777048..cfcb460 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 22f6748..8d6484a 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 e50567d..86ad134 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 e5d6019..532f1bd 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 8c2d9af..aa2fb80 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 a354c80..75d0482 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 3804ec6..50e16b4 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 925ff35..9bc810c 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 bd7aabd..1581809 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>
--
1.7.7
More information about the devel
mailing list