[rtems commit] posix: Create key implementation header
Sebastian Huber
sebh at rtems.org
Tue Aug 6 13:44:13 UTC 2013
Module: rtems
Branch: master
Commit: 2ad250e92d2978b56a9a552a0b55c1f8046312cb
Changeset: http://git.rtems.org/rtems/commit/?id=2ad250e92d2978b56a9a552a0b55c1f8046312cb
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Aug 6 14:46:24 2013 +0200
posix: Create key implementation header
Move implementation specific parts of key.h and key.inl into new header
file keyimpl.h. The key.h contains now only the application visible
API.
---
cpukit/libcsupport/src/resource_snapshot.c | 2 +-
cpukit/posix/Makefile.am | 3 +-
cpukit/posix/include/rtems/posix/key.h | 105 ++---------------
cpukit/posix/include/rtems/posix/keyimpl.h | 177 ++++++++++++++++++++++++++++
cpukit/posix/inline/rtems/posix/key.inl | 92 --------------
cpukit/posix/preinstall.am | 8 +-
cpukit/posix/src/key.c | 48 +++-----
cpukit/posix/src/keycreate.c | 2 +-
cpukit/posix/src/keydelete.c | 2 +-
cpukit/posix/src/keyfreememory.c | 7 +-
cpukit/posix/src/keygetspecific.c | 2 +-
cpukit/posix/src/keyrundestructors.c | 7 +-
cpukit/posix/src/keysetspecific.c | 15 +--
cpukit/posix/src/pthread.c | 2 +-
cpukit/posix/src/pthreadinitthreads.c | 1 -
cpukit/sapi/src/posixapi.c | 2 +-
16 files changed, 221 insertions(+), 254 deletions(-)
diff --git a/cpukit/libcsupport/src/resource_snapshot.c b/cpukit/libcsupport/src/resource_snapshot.c
index f283aad..62d9c12 100644
--- a/cpukit/libcsupport/src/resource_snapshot.c
+++ b/cpukit/libcsupport/src/resource_snapshot.c
@@ -42,7 +42,7 @@
#include <rtems/posix/condimpl.h>
#include <rtems/posix/mqueueimpl.h>
#include <rtems/posix/muteximpl.h>
- #include <rtems/posix/key.h>
+ #include <rtems/posix/keyimpl.h>
#include <rtems/posix/psignal.h>
#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/rwlockimpl.h>
diff --git a/cpukit/posix/Makefile.am b/cpukit/posix/Makefile.am
index e7ec45f..3947db7 100644
--- a/cpukit/posix/Makefile.am
+++ b/cpukit/posix/Makefile.am
@@ -30,6 +30,7 @@ include_rtems_posix_HEADERS += include/rtems/posix/cond.h
include_rtems_posix_HEADERS += include/rtems/posix/condimpl.h
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/keyimpl.h
include_rtems_posix_HEADERS += include/rtems/posix/mqueue.h
include_rtems_posix_HEADERS += include/rtems/posix/mqueueimpl.h
include_rtems_posix_HEADERS += include/rtems/posix/mutex.h
@@ -54,8 +55,6 @@ include_rtems_posix_HEADERS += include/rtems/posix/rwlockimpl.h
include_rtems_posix_HEADERS += include/rtems/posix/spinlock.h
include_rtems_posix_HEADERS += include/rtems/posix/spinlockimpl.h
-include_rtems_posix_HEADERS += inline/rtems/posix/key.inl
-
## src
libposix_a_SOURCES += src/aio_cancel.c src/aio_error.c src/aio_fsync.c \
src/aio_read.c src/aio_return.c src/aio_suspend.c src/aio_write.c \
diff --git a/cpukit/posix/include/rtems/posix/key.h b/cpukit/posix/include/rtems/posix/key.h
index ee5b573..9869881 100644
--- a/cpukit/posix/include/rtems/posix/key.h
+++ b/cpukit/posix/include/rtems/posix/key.h
@@ -20,10 +20,15 @@
#ifndef _RTEMS_POSIX_KEY_H
#define _RTEMS_POSIX_KEY_H
+#include <pthread.h>
+
+#include <rtems/score/chain.h>
+#include <rtems/score/object.h>
#include <rtems/score/rbtree.h>
-#include <rtems/score/chainimpl.h>
-#include <rtems/score/freechain.h>
-#include <rtems/score/objectimpl.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
/**
* @defgroup POSIX_KEY POSIX Key
@@ -33,10 +38,6 @@
*/
/**@{**/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/**
* @brief The rbtree node used to manage a POSIX key and value.
*/
@@ -54,14 +55,6 @@ typedef struct {
} POSIX_Keys_Key_value_pair;
/**
- * @brief POSIX_Keys_Freechain is used in Freechain structure
- */
-typedef struct {
- Freechain_Control super_fc;
- size_t bump_count;
-} POSIX_Keys_Freechain;
-
-/**
* @brief The data structure used to manage a POSIX key.
*/
typedef struct {
@@ -71,88 +64,6 @@ typedef struct {
void (*destructor) (void *);
} POSIX_Keys_Control;
-/**
- * @brief The information control block used to manage this class of objects.
- */
-POSIX_EXTERN Objects_Information _POSIX_Keys_Information;
-
-/**
- * @brief The rbtree control block used to manage all key values
- */
-POSIX_EXTERN RBTree_Control _POSIX_Keys_Key_value_lookup_tree;
-
-/**
- * @brief This freechain is used as a memory pool for POSIX_Keys_Key_value_pair.
- */
-POSIX_EXTERN POSIX_Keys_Freechain _POSIX_Keys_Keypool;
-
-/**
- * @brief POSIX key manager initialization.
- *
- * This routine performs the initialization necessary for this manager.
- */
-void _POSIX_Key_Manager_initialization(void);
-
-/**
- * @brief POSIX key Freechain extend handle
- *
- * This routine extend freechain node, which is called in freechain_get
- * automatically.
- */
-bool _POSIX_Keys_Freechain_extend(Freechain_Control *freechain);
-
-/**
- * @brief POSIX keys Red-Black tree node comparison.
- *
- * This routine compares the rbtree node
- */
-int _POSIX_Keys_Key_value_lookup_tree_compare_function(
- const RBTree_Node *node1,
- const RBTree_Node *node2
-);
-
-/**
- * @brief Create thread-specific data POSIX key.
- *
- * This function executes all the destructors associated with the thread's
- * keys. This function will execute until all values have been set to NULL.
- *
- * @param[in] thread is a pointer to the thread whose keys should have
- * all their destructors run.
- *
- * NOTE: This is the routine executed when a thread exits to
- * run through all the keys and do the destructor action.
- */
-void _POSIX_Keys_Run_destructors(
- Thread_Control *thread
-);
-
-/**
- * @brief Free a POSIX key table memory.
- *
- * This memory frees the key table memory associated with @a the_key.
- *
- * @param[in] the_key is a pointer to the POSIX key to free
- * the table memory of.
- */
-void _POSIX_Keys_Free_memory(
- POSIX_Keys_Control *the_key
-);
-
-/**
- * @brief Free a POSIX keys control block.
- *
- * This routine frees a keys control block to the
- * inactive chain of free keys control blocks.
- *
- * @param[in] the_key is a pointer to the POSIX key to free.
- */
-RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
- POSIX_Keys_Control *the_key
-);
-
-#include <rtems/posix/key.inl>
-
/** @} */
#ifdef __cplusplus
diff --git a/cpukit/posix/include/rtems/posix/keyimpl.h b/cpukit/posix/include/rtems/posix/keyimpl.h
new file mode 100644
index 0000000..33059ff
--- /dev/null
+++ b/cpukit/posix/include/rtems/posix/keyimpl.h
@@ -0,0 +1,177 @@
+/**
+ * @file
+ *
+ * @brief Private Inlined Routines for POSIX Key's
+ *
+ * This include file contains the static inline implementation of the private
+ * inlined routines for POSIX key's.
+ */
+
+/*
+ * COPYRIGHT (c) 1989-1999.
+ * 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/key.h>
+#include <rtems/score/freechain.h>
+#include <rtems/score/objectimpl.h>
+
+#ifndef _RTEMS_POSIX_KEYIMPL_H
+#define _RTEMS_POSIX_KEYIMPL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup POSIX_KEY
+ *
+ * @{
+ */
+
+/**
+ * @brief POSIX_Keys_Freechain is used in Freechain structure
+ */
+typedef struct {
+ Freechain_Control super_fc;
+ size_t bump_count;
+} POSIX_Keys_Freechain;
+
+/**
+ * @brief The information control block used to manage this class of objects.
+ */
+POSIX_EXTERN Objects_Information _POSIX_Keys_Information;
+
+/**
+ * @brief The rbtree control block used to manage all key values
+ */
+POSIX_EXTERN RBTree_Control _POSIX_Keys_Key_value_lookup_tree;
+
+/**
+ * @brief This freechain is used as a memory pool for POSIX_Keys_Key_value_pair.
+ */
+POSIX_EXTERN POSIX_Keys_Freechain _POSIX_Keys_Keypool;
+
+/**
+ * @brief POSIX key manager initialization.
+ *
+ * This routine performs the initialization necessary for this manager.
+ */
+void _POSIX_Key_Manager_initialization(void);
+
+/**
+ * @brief POSIX key Freechain extend handle
+ *
+ * This routine extend freechain node, which is called in freechain_get
+ * automatically.
+ */
+bool _POSIX_Keys_Freechain_extend(Freechain_Control *freechain);
+
+/**
+ * @brief POSIX keys Red-Black tree node comparison.
+ *
+ * This routine compares the rbtree node
+ */
+int _POSIX_Keys_Key_value_lookup_tree_compare_function(
+ const RBTree_Node *node1,
+ const RBTree_Node *node2
+);
+
+/**
+ * @brief Create thread-specific data POSIX key.
+ *
+ * This function executes all the destructors associated with the thread's
+ * keys. This function will execute until all values have been set to NULL.
+ *
+ * @param[in] thread is a pointer to the thread whose keys should have
+ * all their destructors run.
+ *
+ * NOTE: This is the routine executed when a thread exits to
+ * run through all the keys and do the destructor action.
+ */
+void _POSIX_Keys_Run_destructors(
+ Thread_Control *thread
+);
+
+/**
+ * @brief Free a POSIX key table memory.
+ *
+ * This memory frees the key table memory associated with @a the_key.
+ *
+ * @param[in] the_key is a pointer to the POSIX key to free
+ * the table memory of.
+ */
+void _POSIX_Keys_Free_memory(
+ POSIX_Keys_Control *the_key
+);
+
+/**
+ * @brief Free a POSIX keys control block.
+ *
+ * This routine frees a keys control block to the
+ * inactive chain of free keys control blocks.
+ *
+ * @param[in] the_key is a pointer to the POSIX key to free.
+ */
+RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
+ POSIX_Keys_Control *the_key
+);
+
+/**
+ * @brief Allocate a keys control block.
+ *
+ * This function allocates a keys control block from
+ * the inactive chain of free keys control blocks.
+ */
+
+RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
+{
+ return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information );
+}
+
+/**
+ * @brief Free a keys control block.
+ *
+ * This routine frees a keys control block to the
+ * inactive chain of free keys control blocks.
+ */
+RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
+ POSIX_Keys_Control *the_key
+)
+{
+ _Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
+}
+
+/**
+ * @brief Get a keys control block.
+ *
+ * This function maps key IDs to key control blocks.
+ * If ID corresponds to a local keys, then it returns
+ * the_key control pointer which maps to ID and location
+ * is set to OBJECTS_LOCAL. if the keys ID is global and
+ * resides on a remote node, then location is set to OBJECTS_REMOTE,
+ * and the_key is undefined. Otherwise, location is set
+ * to OBJECTS_ERROR and the_key is undefined.
+ */
+
+RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get (
+ pthread_key_t id,
+ Objects_Locations *location
+)
+{
+ return (POSIX_Keys_Control *)
+ _Objects_Get( &_POSIX_Keys_Information, (Objects_Id) id, location );
+}
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
diff --git a/cpukit/posix/inline/rtems/posix/key.inl b/cpukit/posix/inline/rtems/posix/key.inl
deleted file mode 100644
index ce5601b..0000000
--- a/cpukit/posix/inline/rtems/posix/key.inl
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * @file
- *
- * @brief Private Inlined Routines for POSIX Key's
- *
- * This include file contains the static inline implementation of the private
- * inlined routines for POSIX key's.
- */
-
-/*
- * COPYRIGHT (c) 1989-1999.
- * 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_KEY_H
-# error "Never use <rtems/posix/key.inl> directly; include <rtems/posix/key.h> instead."
-#endif
-
-#ifndef _RTEMS_POSIX_KEY_INL
-#define _RTEMS_POSIX_KEY_INL
-
-/**
- * @brief Allocate a keys control block.
- *
- * This function allocates a keys control block from
- * the inactive chain of free keys control blocks.
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
-{
- return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information );
-}
-
-/**
- * @brief Free a keys control block.
- *
- * This routine frees a keys control block to the
- * inactive chain of free keys control blocks.
- */
-RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
- POSIX_Keys_Control *the_key
-)
-{
- _Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
-}
-
-/**
- * @brief Get a keys control block.
- *
- * This function maps key IDs to key control blocks.
- * If ID corresponds to a local keys, then it returns
- * the_key control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the keys ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_key is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_key is undefined.
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get (
- pthread_key_t id,
- Objects_Locations *location
-)
-{
- return (POSIX_Keys_Control *)
- _Objects_Get( &_POSIX_Keys_Information, (Objects_Id) id, location );
-}
-
-/**
- * @brief Check if a keys control block is NULL.
- *
- * This function returns @c TRUE if the_key is @c NULL and @c FALSE
- * otherwise.
- *
- * @param[in] the_key is the pointer to the key control block to be checked.
- *
- * @retval TRUE The key control block is @c NULL.
- * @retval FALSE The key control block is not @c NULL.
- */
-RTEMS_INLINE_ROUTINE bool _POSIX_Keys_Is_null (
- POSIX_Keys_Control *the_key
-)
-{
- return !the_key;
-}
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/preinstall.am b/cpukit/posix/preinstall.am
index 3ae3896..093a9df 100644
--- a/cpukit/posix/preinstall.am
+++ b/cpukit/posix/preinstall.am
@@ -64,6 +64,10 @@ $(PROJECT_INCLUDE)/rtems/posix/key.h: include/rtems/posix/key.h $(PROJECT_INCLUD
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/key.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/key.h
+$(PROJECT_INCLUDE)/rtems/posix/keyimpl.h: include/rtems/posix/keyimpl.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/keyimpl.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/keyimpl.h
+
$(PROJECT_INCLUDE)/rtems/posix/mqueue.h: include/rtems/posix/mqueue.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/mqueue.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/mqueue.h
@@ -155,8 +159,4 @@ PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/spinlock.h
$(PROJECT_INCLUDE)/rtems/posix/spinlockimpl.h: include/rtems/posix/spinlockimpl.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/spinlockimpl.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/spinlockimpl.h
-
-$(PROJECT_INCLUDE)/rtems/posix/key.inl: inline/rtems/posix/key.inl $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/key.inl
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/key.inl
endif
diff --git a/cpukit/posix/src/key.c b/cpukit/posix/src/key.c
index 2bb415c..99654c2 100644
--- a/cpukit/posix/src/key.c
+++ b/cpukit/posix/src/key.c
@@ -19,24 +19,10 @@
#include "config.h"
#endif
-#include <errno.h>
-#include <limits.h>
-#include <pthread.h>
-#include <string.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/thread.h>
+#include <rtems/posix/keyimpl.h>
+#include <rtems/posix/config.h>
+#include <rtems/score/chainimpl.h>
#include <rtems/score/wkspace.h>
-#include <rtems/posix/key.h>
-#include <rtems/score/rbtree.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/freechain.h>
-
-/* forward declarations to avoid warnings */
-void _POSIX_Keys_Keypool_init(void);
-void _POSIX_Keys_Freechain_init(Freechain_Control *freechain);
/**
* @brief This routine compares the rbtree node by comparing POSIX key first
@@ -84,22 +70,9 @@ int _POSIX_Keys_Key_value_lookup_tree_compare_function(
}
/**
- * @brief This routine does keypool initialize, keypool contains all
- * POSIX_Keys_Key_value_pair
- */
-
-void _POSIX_Keys_Keypool_init(void)
-{
- _Freechain_Initialize((Freechain_Control *)&_POSIX_Keys_Keypool,
- &_POSIX_Keys_Freechain_extend);
-
- _POSIX_Keys_Freechain_init((Freechain_Control *)&_POSIX_Keys_Keypool);
-}
-
-/**
* @brief This routine does user side freechain initialization
*/
-void _POSIX_Keys_Freechain_init(Freechain_Control *freechain)
+static void _POSIX_Keys_Freechain_init(Freechain_Control *freechain)
{
POSIX_Keys_Freechain *psx_freechain_p = (POSIX_Keys_Freechain *)freechain;
psx_freechain_p->bump_count =
@@ -116,6 +89,19 @@ void _POSIX_Keys_Freechain_init(Freechain_Control *freechain)
}
/**
+ * @brief This routine does keypool initialize, keypool contains all
+ * POSIX_Keys_Key_value_pair
+ */
+
+static void _POSIX_Keys_Keypool_init(void)
+{
+ _Freechain_Initialize((Freechain_Control *)&_POSIX_Keys_Keypool,
+ &_POSIX_Keys_Freechain_extend);
+
+ _POSIX_Keys_Freechain_init((Freechain_Control *)&_POSIX_Keys_Keypool);
+}
+
+/**
* @brief This routine is user defined freechain extension handle
*/
bool _POSIX_Keys_Freechain_extend(Freechain_Control *freechain)
diff --git a/cpukit/posix/src/keycreate.c b/cpukit/posix/src/keycreate.c
index 349e883..4a0f784 100644
--- a/cpukit/posix/src/keycreate.c
+++ b/cpukit/posix/src/keycreate.c
@@ -26,7 +26,7 @@
#include <rtems/system.h>
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
-#include <rtems/posix/key.h>
+#include <rtems/posix/keyimpl.h>
/**
* 17.1.1 Thread-Specific Data Key Create, P1003.1c/Draft 10, p. 163
diff --git a/cpukit/posix/src/keydelete.c b/cpukit/posix/src/keydelete.c
index c3d3da1..5863a40 100644
--- a/cpukit/posix/src/keydelete.c
+++ b/cpukit/posix/src/keydelete.c
@@ -26,7 +26,7 @@
#include <rtems/system.h>
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
-#include <rtems/posix/key.h>
+#include <rtems/posix/keyimpl.h>
/*
* 17.1.3 Thread-Specific Data Key Deletion, P1003.1c/Draft 10, p. 167
diff --git a/cpukit/posix/src/keyfreememory.c b/cpukit/posix/src/keyfreememory.c
index c42616d..d971d0a 100644
--- a/cpukit/posix/src/keyfreememory.c
+++ b/cpukit/posix/src/keyfreememory.c
@@ -19,11 +19,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/rbtree.h>
-#include <rtems/posix/key.h>
+#include <rtems/posix/keyimpl.h>
+#include <rtems/score/chainimpl.h>
void _POSIX_Keys_Free_memory(
POSIX_Keys_Control *the_key
diff --git a/cpukit/posix/src/keygetspecific.c b/cpukit/posix/src/keygetspecific.c
index 88e084e..568a98c 100644
--- a/cpukit/posix/src/keygetspecific.c
+++ b/cpukit/posix/src/keygetspecific.c
@@ -28,7 +28,7 @@
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
#include <rtems/score/rbtree.h>
-#include <rtems/posix/key.h>
+#include <rtems/posix/keyimpl.h>
/*
* 17.1.2 Thread-Specific Data Management, P1003.1c/Draft 10, p. 165
diff --git a/cpukit/posix/src/keyrundestructors.c b/cpukit/posix/src/keyrundestructors.c
index 7e3c88f..d151f4f 100644
--- a/cpukit/posix/src/keyrundestructors.c
+++ b/cpukit/posix/src/keyrundestructors.c
@@ -21,12 +21,9 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/chain.h>
-#include <rtems/posix/key.h>
+#include <rtems/posix/keyimpl.h>
#include <rtems/posix/threadsup.h>
+#include <rtems/score/chainimpl.h>
/*
* _POSIX_Keys_Run_destructors
diff --git a/cpukit/posix/src/keysetspecific.c b/cpukit/posix/src/keysetspecific.c
index f527fe1..4a1adb6 100644
--- a/cpukit/posix/src/keysetspecific.c
+++ b/cpukit/posix/src/keysetspecific.c
@@ -19,18 +19,11 @@
#include "config.h"
#endif
-#include <errno.h>
-#include <limits.h>
-#include <pthread.h>
-#include <string.h>
-#include <stddef.h>
-
-#include <rtems/system.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/rbtree.h>
-#include <rtems/posix/key.h>
+#include <rtems/posix/keyimpl.h>
#include <rtems/posix/threadsup.h>
+#include <rtems/score/chainimpl.h>
+
+#include <errno.h>
/*
* 17.1.2 Thread-Specific Data Management, P1003.1c/Draft 10, p. 165
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index 13f7525..408bb07 100644
--- a/cpukit/posix/src/pthread.c
+++ b/cpukit/posix/src/pthread.c
@@ -36,7 +36,7 @@
#include <rtems/posix/priorityimpl.h>
#include <rtems/posix/psignalimpl.h>
#include <rtems/posix/config.h>
-#include <rtems/posix/key.h>
+#include <rtems/posix/keyimpl.h>
#include <rtems/posix/time.h>
#include <rtems/score/timespec.h>
diff --git a/cpukit/posix/src/pthreadinitthreads.c b/cpukit/posix/src/pthreadinitthreads.c
index 9f2f468..961105c 100644
--- a/cpukit/posix/src/pthreadinitthreads.c
+++ b/cpukit/posix/src/pthreadinitthreads.c
@@ -32,7 +32,6 @@
#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/priorityimpl.h>
#include <rtems/posix/config.h>
-#include <rtems/posix/key.h>
#include <rtems/posix/time.h>
void _POSIX_Threads_Initialize_user_threads_body(void)
diff --git a/cpukit/sapi/src/posixapi.c b/cpukit/sapi/src/posixapi.c
index f0859a3..af9ba2c 100644
--- a/cpukit/sapi/src/posixapi.c
+++ b/cpukit/sapi/src/posixapi.c
@@ -30,7 +30,7 @@
#include <rtems/posix/barrierimpl.h>
#include <rtems/posix/condimpl.h>
#include <rtems/posix/config.h>
-#include <rtems/posix/key.h>
+#include <rtems/posix/keyimpl.h>
#include <rtems/posix/mqueueimpl.h>
#include <rtems/posix/muteximpl.h>
#include <rtems/posix/posixapi.h>
More information about the vc
mailing list