diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-08-06 14:46:24 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-08-06 15:47:57 +0200 |
commit | 2ad250e92d2978b56a9a552a0b55c1f8046312cb (patch) | |
tree | a1aa5613b23bcb54c995546be8591430e3304aea /cpukit/posix/src/key.c | |
parent | psxtests/psx14: Include missing header file (diff) | |
download | rtems-2ad250e92d2978b56a9a552a0b55c1f8046312cb.tar.bz2 |
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.
Diffstat (limited to 'cpukit/posix/src/key.c')
-rw-r--r-- | cpukit/posix/src/key.c | 48 |
1 files changed, 17 insertions, 31 deletions
diff --git a/cpukit/posix/src/key.c b/cpukit/posix/src/key.c index 2bb415c4d5..99654c2da4 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) |