summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include/rtems/posix/keyimpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/include/rtems/posix/keyimpl.h')
-rw-r--r--cpukit/posix/include/rtems/posix/keyimpl.h31
1 files changed, 14 insertions, 17 deletions
diff --git a/cpukit/posix/include/rtems/posix/keyimpl.h b/cpukit/posix/include/rtems/posix/keyimpl.h
index b6b34b21dd..f01eda4de3 100644
--- a/cpukit/posix/include/rtems/posix/keyimpl.h
+++ b/cpukit/posix/include/rtems/posix/keyimpl.h
@@ -35,14 +35,6 @@ extern "C" {
*/
/**
- * @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;
@@ -55,7 +47,7 @@ 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;
+POSIX_EXTERN Freechain_Control _POSIX_Keys_Keypool;
/**
* @brief POSIX key manager initialization.
@@ -65,14 +57,6 @@ POSIX_EXTERN POSIX_Keys_Freechain _POSIX_Keys_Keypool;
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
@@ -168,6 +152,19 @@ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get (
_Objects_Get( &_POSIX_Keys_Information, (Objects_Id) id, location );
}
+RTEMS_INLINE_ROUTINE POSIX_Keys_Key_value_pair *
+_POSIX_Keys_Key_value_pair_allocate( void )
+{
+ return (POSIX_Keys_Key_value_pair *) _Freechain_Get( &_POSIX_Keys_Keypool );
+}
+
+RTEMS_INLINE_ROUTINE void _POSIX_Keys_Key_value_pair_free(
+ POSIX_Keys_Key_value_pair *key_value_pair
+)
+{
+ _Freechain_Put( &_POSIX_Keys_Keypool, key_value_pair );
+}
+
/** @} */
#ifdef __cplusplus