summaryrefslogtreecommitdiffstats
path: root/cpukit/posix
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix')
-rw-r--r--cpukit/posix/Makefile.am2
-rw-r--r--cpukit/posix/include/rtems/posix/pthread.h149
-rw-r--r--cpukit/posix/include/rtems/posix/pthreadimpl.h229
-rw-r--r--cpukit/posix/inline/rtems/posix/pthread.inl72
-rw-r--r--cpukit/posix/preinstall.am8
-rw-r--r--cpukit/posix/src/alarm.c2
-rw-r--r--cpukit/posix/src/cancel.c2
-rw-r--r--cpukit/posix/src/canceleval.c2
-rw-r--r--cpukit/posix/src/cancelrun.c2
-rw-r--r--cpukit/posix/src/cleanuppop.c2
-rw-r--r--cpukit/posix/src/cleanuppush.c2
-rw-r--r--cpukit/posix/src/kill.c2
-rw-r--r--cpukit/posix/src/kill_r.c2
-rw-r--r--cpukit/posix/src/killinfo.c2
-rw-r--r--cpukit/posix/src/psignal.c2
-rw-r--r--cpukit/posix/src/psignalchecksignal.c2
-rw-r--r--cpukit/posix/src/psignalclearprocesssignals.c2
-rw-r--r--cpukit/posix/src/psignalclearsignals.c2
-rw-r--r--cpukit/posix/src/psignalsetprocesssignals.c2
-rw-r--r--cpukit/posix/src/psignalunblockthread.c2
-rw-r--r--cpukit/posix/src/psxtransschedparam.c2
-rw-r--r--cpukit/posix/src/pthread.c2
-rw-r--r--cpukit/posix/src/pthreadattrinit.c2
-rw-r--r--cpukit/posix/src/pthreadattrsetguardsize.c2
-rw-r--r--cpukit/posix/src/pthreadattrsetinheritsched.c2
-rw-r--r--cpukit/posix/src/pthreadattrsetschedpolicy.c2
-rw-r--r--cpukit/posix/src/pthreadattrsetscope.c2
-rw-r--r--cpukit/posix/src/pthreadattrsetstack.c2
-rw-r--r--cpukit/posix/src/pthreadattrsetstacksize.c2
-rw-r--r--cpukit/posix/src/pthreadcreate.c2
-rw-r--r--cpukit/posix/src/pthreaddetach.c2
-rw-r--r--cpukit/posix/src/pthreadequal.c2
-rw-r--r--cpukit/posix/src/pthreadexit.c2
-rw-r--r--cpukit/posix/src/pthreadgetschedparam.c2
-rw-r--r--cpukit/posix/src/pthreadinitthreads.c2
-rw-r--r--cpukit/posix/src/pthreadjoin.c2
-rw-r--r--cpukit/posix/src/pthreadkill.c2
-rw-r--r--cpukit/posix/src/pthreadsetschedparam.c2
-rw-r--r--cpukit/posix/src/pthreadsigmask.c2
-rw-r--r--cpukit/posix/src/setcancelstate.c2
-rw-r--r--cpukit/posix/src/setcanceltype.c2
-rw-r--r--cpukit/posix/src/sigaction.c2
-rw-r--r--cpukit/posix/src/sigpending.c2
-rw-r--r--cpukit/posix/src/sigqueue.c2
-rw-r--r--cpukit/posix/src/sigtimedwait.c2
-rw-r--r--cpukit/posix/src/testcancel.c2
-rw-r--r--cpukit/posix/src/ualarm.c2
47 files changed, 278 insertions, 266 deletions
diff --git a/cpukit/posix/Makefile.am b/cpukit/posix/Makefile.am
index c4e66858cf..f378209ee7 100644
--- a/cpukit/posix/Makefile.am
+++ b/cpukit/posix/Makefile.am
@@ -39,6 +39,7 @@ include_rtems_posix_HEADERS += include/rtems/posix/priorityimpl.h
include_rtems_posix_HEADERS += include/rtems/posix/psignal.h
include_rtems_posix_HEADERS += include/rtems/posix/psignalimpl.h
include_rtems_posix_HEADERS += include/rtems/posix/pthread.h
+include_rtems_posix_HEADERS += include/rtems/posix/pthreadimpl.h
include_rtems_posix_HEADERS += include/rtems/posix/ptimer.h
include_rtems_posix_HEADERS += include/rtems/posix/semaphore.h
include_rtems_posix_HEADERS += include/rtems/posix/semaphoreimpl.h
@@ -51,7 +52,6 @@ include_rtems_posix_HEADERS += include/rtems/posix/rwlock.h
include_rtems_posix_HEADERS += include/rtems/posix/spinlock.h
include_rtems_posix_HEADERS += inline/rtems/posix/key.inl
-include_rtems_posix_HEADERS += inline/rtems/posix/pthread.inl
include_rtems_posix_HEADERS += inline/rtems/posix/timer.inl
include_rtems_posix_HEADERS += inline/rtems/posix/rwlock.inl
include_rtems_posix_HEADERS += inline/rtems/posix/spinlock.inl
diff --git a/cpukit/posix/include/rtems/posix/pthread.h b/cpukit/posix/include/rtems/posix/pthread.h
index 0f495fa660..3c210f588f 100644
--- a/cpukit/posix/include/rtems/posix/pthread.h
+++ b/cpukit/posix/include/rtems/posix/pthread.h
@@ -1,6 +1,6 @@
/**
* @file
- *
+ *
* @brief POSIX Threads Private Support
*
* This include file contains all the private support information for
@@ -19,7 +19,6 @@
#ifndef _RTEMS_POSIX_PTHREAD_H
#define _RTEMS_POSIX_PTHREAD_H
-
#include <rtems/posix/config.h>
#include <rtems/posix/threadsup.h>
#include <rtems/score/thread.h>
@@ -34,151 +33,9 @@ extern "C" {
* @ingroup POSIXAPI
*
* @brief Private Support Information for POSIX Threads
- *
- */
-/**@{**/
-
-/**
- * The following sets the minimum stack size for POSIX threads.
- */
-#define PTHREAD_MINIMUM_STACK_SIZE (_Stack_Minimum() * 2)
-
-/**
- * The following defines the information control block used to manage
- * this class of objects.
- */
-POSIX_EXTERN Objects_Information _POSIX_Threads_Information;
-
-/**
- * This variable contains the default POSIX Thread attributes.
- */
-extern const pthread_attr_t _POSIX_Threads_Default_attributes;
-
-/**
- * When the user configures a set of POSIX API initialization threads,
- * This variable will point to the method used to initialize them.
- *
- * NOTE: It is instantiated and initialized by confdefs.h based upon
- * application requirements.
- */
-extern void (*_POSIX_Threads_Initialize_user_threads_p)(void);
-
-/**
- * @brief POSIX threads manager initialization.
- *
- * This routine performs the initialization necessary for this manager.
- */
-void _POSIX_Threads_Manager_initialization(void);
-
-/**
- * @brief Allocate POSIX thread control block.
- *
- * This function allocates a pthread control block from
- * the inactive chain of free pthread control blocks.
- *
- * @return This method returns a newly allocated thread.
- */
-RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void );
-
-/**
- * @brief Free POSIX control block.
- *
- * This routine frees a pthread control block to the
- * inactive chain of free pthread control blocks.
*
- * @param[in] the_pthread is a pointer to the thread to free.
*/
-RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free(
- Thread_Control *the_pthread
-);
-
-/**
- * @brief Map POSIX thread IDs to control blocks.
- *
- * This function maps pthread IDs to pthread control blocks.
- * If ID corresponds to a local pthread, then it returns
- * the_pthread control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the pthread ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_pthread is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_pthread is undefined.
- *
- * @param[in] id is the id to lookup
- * @param[in] location points to the returned location value
- *
- * @return This methods returns a pointer to the corresponding Thread_Control.
- */
-RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get(
- pthread_t id,
- Objects_Locations *location
-);
-
-/**
- * @brief Check if a POSIX thread control block is NULL.
- *
- * This function returns @c TRUE if the_pthread is @c NULL and @c FALSE
- * otherwise.
- *
- * @param[in] the_pthread is a pointer to the POSIX thread control block
- * to check.
- *
- * @retval TRUE The thread control block is @c NULL.
- * @retval FALSE The thread control block is not @c NULL.
- */
-RTEMS_INLINE_ROUTINE bool _POSIX_Threads_Is_null(
- Thread_Control *the_pthread
-);
-
-/**
- * @brief POSIX threads sporadic budget callout.
- *
- * This routine handles the sporadic scheduling algorithm.
- *
- * @param[in] the_thread is a pointer to the thread whose budget
- * has been exceeded.
- */
-void _POSIX_Threads_Sporadic_budget_callout(
- Thread_Control *the_thread
-);
-
-/**
- * This routine supports the sporadic scheduling algorithm. It
- * is scheduled to be executed at the end of each replenishment
- * period. In sporadic scheduling a thread will execute at a
- * high priority for a user specified amount of CPU time. When
- * it exceeds that amount of CPU time, its priority is automatically
- * lowered. This TSR is executed when it is time to replenish
- * the thread's processor budget and raise its priority.
- *
- * @param[in] id is ignored
- * @param[in] argument is a pointer to the Thread_Control structure
- * for the thread being replenished.
- */
-void _POSIX_Threads_Sporadic_budget_TSR(
- Objects_Id id,
- void *argument
-);
-
-/**
- * @brief Translate sched_param into SuperCore terms.
- *
- * This method translates the POSIX API sched_param into the corresponding
- * SuperCore settings.
- *
- * @param[in] policy is the POSIX scheduling policy
- * @param[in] param points to the scheduling parameter structure
- * @param[in] budget_algorithm points to the output CPU Budget algorithm
- * @param[in] budget_callout points to the output CPU Callout
- *
- * @retval 0 Indicates success.
- * @retval error_code POSIX error code indicating failure.
- */
-int _POSIX_Thread_Translate_sched_param(
- int policy,
- struct sched_param *param,
- Thread_CPU_budget_algorithms *budget_algorithm,
- Thread_CPU_budget_algorithm_callout *budget_callout
-);
+/**@{**/
/**
* @brief POSIX threads initialize user threads body.
@@ -188,8 +45,6 @@ int _POSIX_Thread_Translate_sched_param(
*/
extern void _POSIX_Threads_Initialize_user_threads_body(void);
-#include <rtems/posix/pthread.inl>
-
/** @} */
#ifdef __cplusplus
diff --git a/cpukit/posix/include/rtems/posix/pthreadimpl.h b/cpukit/posix/include/rtems/posix/pthreadimpl.h
new file mode 100644
index 0000000000..1231f01634
--- /dev/null
+++ b/cpukit/posix/include/rtems/posix/pthreadimpl.h
@@ -0,0 +1,229 @@
+/**
+ * @file
+ *
+ * @brief POSIX Threads Private Support
+ *
+ * This include file contains all the private support information for
+ * POSIX threads.
+ */
+
+/*
+ * 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_PTHREADIMPL_H
+#define _RTEMS_POSIX_PTHREADIMPL_H
+
+#include <rtems/posix/pthread.h>
+#include <rtems/posix/config.h>
+#include <rtems/posix/threadsup.h>
+#include <rtems/score/thread.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup POSIX_PTHREAD
+ */
+/**@{**/
+
+/**
+ * The following sets the minimum stack size for POSIX threads.
+ */
+#define PTHREAD_MINIMUM_STACK_SIZE (_Stack_Minimum() * 2)
+
+/**
+ * The following defines the information control block used to manage
+ * this class of objects.
+ */
+POSIX_EXTERN Objects_Information _POSIX_Threads_Information;
+
+/**
+ * This variable contains the default POSIX Thread attributes.
+ */
+extern const pthread_attr_t _POSIX_Threads_Default_attributes;
+
+/**
+ * When the user configures a set of POSIX API initialization threads,
+ * This variable will point to the method used to initialize them.
+ *
+ * NOTE: It is instantiated and initialized by confdefs.h based upon
+ * application requirements.
+ */
+extern void (*_POSIX_Threads_Initialize_user_threads_p)(void);
+
+/**
+ * @brief POSIX threads manager initialization.
+ *
+ * This routine performs the initialization necessary for this manager.
+ */
+void _POSIX_Threads_Manager_initialization(void);
+
+/**
+ * @brief Allocate POSIX thread control block.
+ *
+ * This function allocates a pthread control block from
+ * the inactive chain of free pthread control blocks.
+ *
+ * @return This method returns a newly allocated thread.
+ */
+RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void );
+
+/**
+ * @brief Free POSIX control block.
+ *
+ * This routine frees a pthread control block to the
+ * inactive chain of free pthread control blocks.
+ *
+ * @param[in] the_pthread is a pointer to the thread to free.
+ */
+RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free(
+ Thread_Control *the_pthread
+);
+
+/**
+ * @brief Map POSIX thread IDs to control blocks.
+ *
+ * This function maps pthread IDs to pthread control blocks.
+ * If ID corresponds to a local pthread, then it returns
+ * the_pthread control pointer which maps to ID and location
+ * is set to OBJECTS_LOCAL. if the pthread ID is global and
+ * resides on a remote node, then location is set to OBJECTS_REMOTE,
+ * and the_pthread is undefined. Otherwise, location is set
+ * to OBJECTS_ERROR and the_pthread is undefined.
+ *
+ * @param[in] id is the id to lookup
+ * @param[in] location points to the returned location value
+ *
+ * @return This methods returns a pointer to the corresponding Thread_Control.
+ */
+RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get(
+ pthread_t id,
+ Objects_Locations *location
+);
+
+/**
+ * @brief Check if a POSIX thread control block is NULL.
+ *
+ * This function returns @c TRUE if the_pthread is @c NULL and @c FALSE
+ * otherwise.
+ *
+ * @param[in] the_pthread is a pointer to the POSIX thread control block
+ * to check.
+ *
+ * @retval TRUE The thread control block is @c NULL.
+ * @retval FALSE The thread control block is not @c NULL.
+ */
+RTEMS_INLINE_ROUTINE bool _POSIX_Threads_Is_null(
+ Thread_Control *the_pthread
+);
+
+/**
+ * @brief POSIX threads sporadic budget callout.
+ *
+ * This routine handles the sporadic scheduling algorithm.
+ *
+ * @param[in] the_thread is a pointer to the thread whose budget
+ * has been exceeded.
+ */
+void _POSIX_Threads_Sporadic_budget_callout(
+ Thread_Control *the_thread
+);
+
+/**
+ * This routine supports the sporadic scheduling algorithm. It
+ * is scheduled to be executed at the end of each replenishment
+ * period. In sporadic scheduling a thread will execute at a
+ * high priority for a user specified amount of CPU time. When
+ * it exceeds that amount of CPU time, its priority is automatically
+ * lowered. This TSR is executed when it is time to replenish
+ * the thread's processor budget and raise its priority.
+ *
+ * @param[in] id is ignored
+ * @param[in] argument is a pointer to the Thread_Control structure
+ * for the thread being replenished.
+ */
+void _POSIX_Threads_Sporadic_budget_TSR(
+ Objects_Id id,
+ void *argument
+);
+
+/**
+ * @brief Translate sched_param into SuperCore terms.
+ *
+ * This method translates the POSIX API sched_param into the corresponding
+ * SuperCore settings.
+ *
+ * @param[in] policy is the POSIX scheduling policy
+ * @param[in] param points to the scheduling parameter structure
+ * @param[in] budget_algorithm points to the output CPU Budget algorithm
+ * @param[in] budget_callout points to the output CPU Callout
+ *
+ * @retval 0 Indicates success.
+ * @retval error_code POSIX error code indicating failure.
+ */
+int _POSIX_Thread_Translate_sched_param(
+ int policy,
+ struct sched_param *param,
+ Thread_CPU_budget_algorithms *budget_algorithm,
+ Thread_CPU_budget_algorithm_callout *budget_callout
+);
+
+/*
+ * _POSIX_Threads_Allocate
+ */
+
+RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
+{
+ return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
+}
+
+/*
+ * _POSIX_Threads_Free
+ */
+
+RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
+ Thread_Control *the_pthread
+)
+{
+ _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
+}
+
+/*
+ * _POSIX_Threads_Get
+ */
+
+RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get (
+ pthread_t id,
+ Objects_Locations *location
+)
+{
+ return (Thread_Control *)
+ _Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location );
+}
+
+/*
+ * _POSIX_Threads_Is_null
+ */
+
+RTEMS_INLINE_ROUTINE bool _POSIX_Threads_Is_null (
+ Thread_Control *the_pthread
+)
+{
+ return !the_pthread;
+}
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
diff --git a/cpukit/posix/inline/rtems/posix/pthread.inl b/cpukit/posix/inline/rtems/posix/pthread.inl
deleted file mode 100644
index 2df49804b0..0000000000
--- a/cpukit/posix/inline/rtems/posix/pthread.inl
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * @file
- *
- * @brief Private Inlined Routines for POSIX Threads
- *
- * This include file contains the static inline implementation of the private
- * inlined routines for POSIX threads.
- */
-
-/*
- * 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_PTHREAD_H
-# error "Never use <rtems/posix/pthread.inl> directly; include <rtems/posix/pthread.h> instead."
-#endif
-
-#ifndef _RTEMS_POSIX_PTHREAD_INL
-#define _RTEMS_POSIX_PTHREAD_INL
-
-/*
- * _POSIX_Threads_Allocate
- */
-
-RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
-{
- return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
-}
-
-/*
- * _POSIX_Threads_Free
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
- Thread_Control *the_pthread
-)
-{
- _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
-}
-
-/*
- * _POSIX_Threads_Get
- */
-
-RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get (
- pthread_t id,
- Objects_Locations *location
-)
-{
- return (Thread_Control *)
- _Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location );
-}
-
-/*
- * _POSIX_Threads_Is_null
- */
-
-RTEMS_INLINE_ROUTINE bool _POSIX_Threads_Is_null (
- Thread_Control *the_pthread
-)
-{
- return !the_pthread;
-}
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/preinstall.am b/cpukit/posix/preinstall.am
index 4548628b21..2cb926193e 100644
--- a/cpukit/posix/preinstall.am
+++ b/cpukit/posix/preinstall.am
@@ -100,6 +100,10 @@ $(PROJECT_INCLUDE)/rtems/posix/pthread.h: include/rtems/posix/pthread.h $(PROJEC
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/pthread.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/pthread.h
+$(PROJECT_INCLUDE)/rtems/posix/pthreadimpl.h: include/rtems/posix/pthreadimpl.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/pthreadimpl.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/pthreadimpl.h
+
$(PROJECT_INCLUDE)/rtems/posix/ptimer.h: include/rtems/posix/ptimer.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/ptimer.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/ptimer.h
@@ -144,10 +148,6 @@ $(PROJECT_INCLUDE)/rtems/posix/key.inl: inline/rtems/posix/key.inl $(PROJECT_INC
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/key.inl
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/key.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
-
$(PROJECT_INCLUDE)/rtems/posix/timer.inl: inline/rtems/posix/timer.inl $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/timer.inl
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/timer.inl
diff --git a/cpukit/posix/src/alarm.c b/cpukit/posix/src/alarm.c
index 5130b0162b..98edcb7a15 100644
--- a/cpukit/posix/src/alarm.c
+++ b/cpukit/posix/src/alarm.c
@@ -24,7 +24,7 @@
#include <pthread.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/psignalimpl.h>
/*
diff --git a/cpukit/posix/src/cancel.c b/cpukit/posix/src/cancel.c
index 77ccf8c238..9ea7f93319 100644
--- a/cpukit/posix/src/cancel.c
+++ b/cpukit/posix/src/cancel.c
@@ -27,7 +27,7 @@
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/threadsup.h>
/*
diff --git a/cpukit/posix/src/canceleval.c b/cpukit/posix/src/canceleval.c
index 2501b7d499..caa3d5db98 100644
--- a/cpukit/posix/src/canceleval.c
+++ b/cpukit/posix/src/canceleval.c
@@ -22,7 +22,7 @@
#include <rtems/system.h>
#include <rtems/score/thread.h>
#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
diff --git a/cpukit/posix/src/cancelrun.c b/cpukit/posix/src/cancelrun.c
index 2d73bdaca7..20132e185d 100644
--- a/cpukit/posix/src/cancelrun.c
+++ b/cpukit/posix/src/cancelrun.c
@@ -27,7 +27,7 @@
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
diff --git a/cpukit/posix/src/cleanuppop.c b/cpukit/posix/src/cleanuppop.c
index bbadec5f11..5ca476306d 100644
--- a/cpukit/posix/src/cleanuppop.c
+++ b/cpukit/posix/src/cleanuppop.c
@@ -27,7 +27,7 @@
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/threadsup.h>
/*
diff --git a/cpukit/posix/src/cleanuppush.c b/cpukit/posix/src/cleanuppush.c
index 4fb82c250b..f27ab7947a 100644
--- a/cpukit/posix/src/cleanuppush.c
+++ b/cpukit/posix/src/cleanuppush.c
@@ -27,7 +27,7 @@
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/threadsup.h>
/*
diff --git a/cpukit/posix/src/kill.c b/cpukit/posix/src/kill.c
index cf60cac5a1..9e4dacbe03 100644
--- a/cpukit/posix/src/kill.c
+++ b/cpukit/posix/src/kill.c
@@ -22,7 +22,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/psignalimpl.h>
int kill(
diff --git a/cpukit/posix/src/kill_r.c b/cpukit/posix/src/kill_r.c
index 57f5c24473..5f603e29f6 100644
--- a/cpukit/posix/src/kill_r.c
+++ b/cpukit/posix/src/kill_r.c
@@ -24,7 +24,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/psignalimpl.h>
#if defined(RTEMS_NEWLIB)
diff --git a/cpukit/posix/src/killinfo.c b/cpukit/posix/src/killinfo.c
index f386757e8f..98fbf1eca2 100644
--- a/cpukit/posix/src/killinfo.c
+++ b/cpukit/posix/src/killinfo.c
@@ -25,7 +25,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/psignalimpl.h>
#include <rtems/seterr.h>
#include <rtems/score/isr.h>
diff --git a/cpukit/posix/src/psignal.c b/cpukit/posix/src/psignal.c
index eeee127f47..0f0c5e7758 100644
--- a/cpukit/posix/src/psignal.c
+++ b/cpukit/posix/src/psignal.c
@@ -36,7 +36,7 @@
#include <rtems/seterr.h>
#include <rtems/posix/threadsup.h>
#include <rtems/posix/psignalimpl.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/time.h>
#include <stdio.h>
diff --git a/cpukit/posix/src/psignalchecksignal.c b/cpukit/posix/src/psignalchecksignal.c
index 82fcb62225..53a4632d75 100644
--- a/cpukit/posix/src/psignalchecksignal.c
+++ b/cpukit/posix/src/psignalchecksignal.c
@@ -34,7 +34,7 @@
#include <rtems/seterr.h>
#include <rtems/posix/threadsup.h>
#include <rtems/posix/psignalimpl.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/time.h>
#include <stdio.h>
diff --git a/cpukit/posix/src/psignalclearprocesssignals.c b/cpukit/posix/src/psignalclearprocesssignals.c
index b16398c8cf..429a3edfa6 100644
--- a/cpukit/posix/src/psignalclearprocesssignals.c
+++ b/cpukit/posix/src/psignalclearprocesssignals.c
@@ -30,7 +30,7 @@
#include <rtems/seterr.h>
#include <rtems/posix/threadsup.h>
#include <rtems/posix/psignalimpl.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/time.h>
#include <stdio.h>
diff --git a/cpukit/posix/src/psignalclearsignals.c b/cpukit/posix/src/psignalclearsignals.c
index e71f2fa575..90bd5032b4 100644
--- a/cpukit/posix/src/psignalclearsignals.c
+++ b/cpukit/posix/src/psignalclearsignals.c
@@ -30,7 +30,7 @@
#include <rtems/seterr.h>
#include <rtems/posix/threadsup.h>
#include <rtems/posix/psignalimpl.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/time.h>
#include <stdio.h>
diff --git a/cpukit/posix/src/psignalsetprocesssignals.c b/cpukit/posix/src/psignalsetprocesssignals.c
index 92c1d8164e..122e2f2d0d 100644
--- a/cpukit/posix/src/psignalsetprocesssignals.c
+++ b/cpukit/posix/src/psignalsetprocesssignals.c
@@ -30,7 +30,7 @@
#include <rtems/seterr.h>
#include <rtems/posix/threadsup.h>
#include <rtems/posix/psignalimpl.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/time.h>
#include <stdio.h>
diff --git a/cpukit/posix/src/psignalunblockthread.c b/cpukit/posix/src/psignalunblockthread.c
index b46f8a479c..34816fa889 100644
--- a/cpukit/posix/src/psignalunblockthread.c
+++ b/cpukit/posix/src/psignalunblockthread.c
@@ -30,7 +30,7 @@
#include <rtems/seterr.h>
#include <rtems/posix/threadsup.h>
#include <rtems/posix/psignalimpl.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/time.h>
#include <stdio.h>
diff --git a/cpukit/posix/src/psxtransschedparam.c b/cpukit/posix/src/psxtransschedparam.c
index e528acaace..6e01aa1da9 100644
--- a/cpukit/posix/src/psxtransschedparam.c
+++ b/cpukit/posix/src/psxtransschedparam.c
@@ -22,7 +22,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/priorityimpl.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index 1aa64c713a..a82b0363eb 100644
--- a/cpukit/posix/src/pthread.c
+++ b/cpukit/posix/src/pthread.c
@@ -31,7 +31,7 @@
#include <rtems/score/userextimpl.h>
#include <rtems/score/wkspace.h>
#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/priorityimpl.h>
#include <rtems/posix/psignalimpl.h>
#include <rtems/posix/config.h>
diff --git a/cpukit/posix/src/pthreadattrinit.c b/cpukit/posix/src/pthreadattrinit.c
index dd3f222cf6..cf0ecabfe9 100644
--- a/cpukit/posix/src/pthreadattrinit.c
+++ b/cpukit/posix/src/pthreadattrinit.c
@@ -22,7 +22,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
/**
* 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140
diff --git a/cpukit/posix/src/pthreadattrsetguardsize.c b/cpukit/posix/src/pthreadattrsetguardsize.c
index f6df5784ef..5b41994577 100644
--- a/cpukit/posix/src/pthreadattrsetguardsize.c
+++ b/cpukit/posix/src/pthreadattrsetguardsize.c
@@ -23,7 +23,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
int pthread_attr_setguardsize(
pthread_attr_t *attr,
diff --git a/cpukit/posix/src/pthreadattrsetinheritsched.c b/cpukit/posix/src/pthreadattrsetinheritsched.c
index 8f414abed3..0f15a0adcf 100644
--- a/cpukit/posix/src/pthreadattrsetinheritsched.c
+++ b/cpukit/posix/src/pthreadattrsetinheritsched.c
@@ -24,7 +24,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
int pthread_attr_setinheritsched(
pthread_attr_t *attr,
diff --git a/cpukit/posix/src/pthreadattrsetschedpolicy.c b/cpukit/posix/src/pthreadattrsetschedpolicy.c
index 4b4187ef40..434658fd46 100644
--- a/cpukit/posix/src/pthreadattrsetschedpolicy.c
+++ b/cpukit/posix/src/pthreadattrsetschedpolicy.c
@@ -24,7 +24,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
diff --git a/cpukit/posix/src/pthreadattrsetscope.c b/cpukit/posix/src/pthreadattrsetscope.c
index db2c931388..fec4fe4f19 100644
--- a/cpukit/posix/src/pthreadattrsetscope.c
+++ b/cpukit/posix/src/pthreadattrsetscope.c
@@ -24,7 +24,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
int pthread_attr_setscope(
pthread_attr_t *attr,
diff --git a/cpukit/posix/src/pthreadattrsetstack.c b/cpukit/posix/src/pthreadattrsetstack.c
index e512c160e2..7c4f14b6a4 100644
--- a/cpukit/posix/src/pthreadattrsetstack.c
+++ b/cpukit/posix/src/pthreadattrsetstack.c
@@ -25,7 +25,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
int pthread_attr_setstack(
pthread_attr_t *attr,
diff --git a/cpukit/posix/src/pthreadattrsetstacksize.c b/cpukit/posix/src/pthreadattrsetstacksize.c
index 313034ce02..3fd78b3615 100644
--- a/cpukit/posix/src/pthreadattrsetstacksize.c
+++ b/cpukit/posix/src/pthreadattrsetstacksize.c
@@ -24,7 +24,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
int pthread_attr_setstacksize(
pthread_attr_t *attr,
diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c
index 78e77acac0..0414fd7603 100644
--- a/cpukit/posix/src/pthreadcreate.c
+++ b/cpukit/posix/src/pthreadcreate.c
@@ -26,7 +26,7 @@
#include <rtems/system.h>
#include <rtems/score/thread.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/priorityimpl.h>
#include <rtems/posix/time.h>
#include <rtems/score/apimutex.h>
diff --git a/cpukit/posix/src/pthreaddetach.c b/cpukit/posix/src/pthreaddetach.c
index 52a42f6b37..3b99a9c476 100644
--- a/cpukit/posix/src/pthreaddetach.c
+++ b/cpukit/posix/src/pthreaddetach.c
@@ -23,7 +23,7 @@
#include <rtems/system.h>
#include <rtems/score/thread.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
/**
* 16.1.4 Detaching a Thread, P1003.1c/Draft 10, p. 149
diff --git a/cpukit/posix/src/pthreadequal.c b/cpukit/posix/src/pthreadequal.c
index 9b2b0282ed..f398e5cf7a 100644
--- a/cpukit/posix/src/pthreadequal.c
+++ b/cpukit/posix/src/pthreadequal.c
@@ -24,7 +24,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/score/thread.h>
int pthread_equal(
diff --git a/cpukit/posix/src/pthreadexit.c b/cpukit/posix/src/pthreadexit.c
index 3b3f0bd95b..03a56c9e96 100644
--- a/cpukit/posix/src/pthreadexit.c
+++ b/cpukit/posix/src/pthreadexit.c
@@ -24,7 +24,7 @@
#include <rtems/system.h>
#include <rtems/score/apimutex.h>
#include <rtems/score/thread.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
void _POSIX_Thread_Exit(
diff --git a/cpukit/posix/src/pthreadgetschedparam.c b/cpukit/posix/src/pthreadgetschedparam.c
index 0060682bdd..7f034cbb78 100644
--- a/cpukit/posix/src/pthreadgetschedparam.c
+++ b/cpukit/posix/src/pthreadgetschedparam.c
@@ -25,7 +25,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/priorityimpl.h>
int pthread_getschedparam(
diff --git a/cpukit/posix/src/pthreadinitthreads.c b/cpukit/posix/src/pthreadinitthreads.c
index df92c2e570..9f2f468d8c 100644
--- a/cpukit/posix/src/pthreadinitthreads.c
+++ b/cpukit/posix/src/pthreadinitthreads.c
@@ -29,7 +29,7 @@
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/priorityimpl.h>
#include <rtems/posix/config.h>
#include <rtems/posix/key.h>
diff --git a/cpukit/posix/src/pthreadjoin.c b/cpukit/posix/src/pthreadjoin.c
index cbc6e17775..0ee700a528 100644
--- a/cpukit/posix/src/pthreadjoin.c
+++ b/cpukit/posix/src/pthreadjoin.c
@@ -24,7 +24,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/score/thread.h>
#include <rtems/score/threadq.h>
diff --git a/cpukit/posix/src/pthreadkill.c b/cpukit/posix/src/pthreadkill.c
index b9f4922fd7..02a9ee7d4d 100644
--- a/cpukit/posix/src/pthreadkill.c
+++ b/cpukit/posix/src/pthreadkill.c
@@ -25,7 +25,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/psignalimpl.h>
#include <rtems/score/isr.h>
#include <rtems/seterr.h>
diff --git a/cpukit/posix/src/pthreadsetschedparam.c b/cpukit/posix/src/pthreadsetschedparam.c
index e7a6161b84..393c41f3d7 100644
--- a/cpukit/posix/src/pthreadsetschedparam.c
+++ b/cpukit/posix/src/pthreadsetschedparam.c
@@ -26,7 +26,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/priorityimpl.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/pthreadsigmask.c b/cpukit/posix/src/pthreadsigmask.c
index 5f30d8df4c..dc97b8dad9 100644
--- a/cpukit/posix/src/pthreadsigmask.c
+++ b/cpukit/posix/src/pthreadsigmask.c
@@ -27,7 +27,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/psignalimpl.h>
#include <rtems/seterr.h>
diff --git a/cpukit/posix/src/setcancelstate.c b/cpukit/posix/src/setcancelstate.c
index 4d0699c310..0d85fe624c 100644
--- a/cpukit/posix/src/setcancelstate.c
+++ b/cpukit/posix/src/setcancelstate.c
@@ -26,7 +26,7 @@
#include <rtems/score/isr.h>
#include <rtems/score/thread.h>
#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/threadsup.h>
/*
diff --git a/cpukit/posix/src/setcanceltype.c b/cpukit/posix/src/setcanceltype.c
index 115eebf638..f97affa8fb 100644
--- a/cpukit/posix/src/setcanceltype.c
+++ b/cpukit/posix/src/setcanceltype.c
@@ -26,7 +26,7 @@
#include <rtems/score/isr.h>
#include <rtems/score/thread.h>
#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/threadsup.h>
/*
diff --git a/cpukit/posix/src/sigaction.c b/cpukit/posix/src/sigaction.c
index cfcc65cec4..8dacc70181 100644
--- a/cpukit/posix/src/sigaction.c
+++ b/cpukit/posix/src/sigaction.c
@@ -25,7 +25,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/psignalimpl.h>
#include <rtems/seterr.h>
#include <rtems/score/isr.h>
diff --git a/cpukit/posix/src/sigpending.c b/cpukit/posix/src/sigpending.c
index 8e31d59b79..a0c1399a98 100644
--- a/cpukit/posix/src/sigpending.c
+++ b/cpukit/posix/src/sigpending.c
@@ -22,7 +22,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/psignalimpl.h>
#include <rtems/seterr.h>
diff --git a/cpukit/posix/src/sigqueue.c b/cpukit/posix/src/sigqueue.c
index 99c214745e..73acc4e8e8 100644
--- a/cpukit/posix/src/sigqueue.c
+++ b/cpukit/posix/src/sigqueue.c
@@ -22,7 +22,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/psignalimpl.h>
int sigqueue(
diff --git a/cpukit/posix/src/sigtimedwait.c b/cpukit/posix/src/sigtimedwait.c
index 5a3a5b00ac..c067c8480f 100644
--- a/cpukit/posix/src/sigtimedwait.c
+++ b/cpukit/posix/src/sigtimedwait.c
@@ -23,7 +23,7 @@
#include <errno.h>
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/psignalimpl.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/testcancel.c b/cpukit/posix/src/testcancel.c
index e7e08d2b73..f999fe54a9 100644
--- a/cpukit/posix/src/testcancel.c
+++ b/cpukit/posix/src/testcancel.c
@@ -27,7 +27,7 @@
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/threadsup.h>
/*
diff --git a/cpukit/posix/src/ualarm.c b/cpukit/posix/src/ualarm.c
index e9a4bb82ae..01b842344b 100644
--- a/cpukit/posix/src/ualarm.c
+++ b/cpukit/posix/src/ualarm.c
@@ -22,7 +22,7 @@
/* #include <errno.h> */
#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
+#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/psignalimpl.h>
#include <rtems/posix/time.h>