diff options
Diffstat (limited to 'cpukit/score')
-rw-r--r-- | cpukit/score/Makefile.am | 2 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/rbtree.h | 24 | ||||
-rw-r--r-- | cpukit/score/src/rbtree.c | 47 |
3 files changed, 1 insertions, 72 deletions
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am index 03ceb7aff9..507d49f739 100644 --- a/cpukit/score/Makefile.am +++ b/cpukit/score/Makefile.am @@ -283,7 +283,7 @@ libscore_a_SOURCES += src/pheapallocate.c \ libscore_a_SOURCES += src/freechain.c ## RBTREE_C_FILES -libscore_a_SOURCES += src/rbtree.c \ +libscore_a_SOURCES += \ src/rbtreeextract.c src/rbtreefind.c \ src/rbtreeinsert.c src/rbtreeiterate.c src/rbtreenext.c diff --git a/cpukit/score/include/rtems/score/rbtree.h b/cpukit/score/include/rtems/score/rbtree.h index ea8f4af5ee..c01de799ea 100644 --- a/cpukit/score/include/rtems/score/rbtree.h +++ b/cpukit/score/include/rtems/score/rbtree.h @@ -169,30 +169,6 @@ typedef struct { RBTree_Node name = RBTREE_NODE_INITIALIZER_EMPTY( name ) /** - * @brief Initialize a RBTree Header. - * - * This routine initializes @a the_rbtree structure to manage the - * contiguous array of @a number_nodes nodes which starts at - * @a starting_address. Each node is of @a node_size bytes. - * - * @param[in] the_rbtree is the pointer to rbtree header - * @param[in] compare The node compare function. - * @param[in] starting_address is the starting address of first node - * @param[in] number_nodes is the number of nodes in rbtree - * @param[in] node_size is the size of node in bytes - * @param[in] is_unique If true, then reject nodes with a duplicate key, else - * otherwise. - */ -void _RBTree_Initialize( - RBTree_Control *the_rbtree, - RBTree_Compare compare, - void *starting_address, - size_t number_nodes, - size_t node_size, - bool is_unique -); - -/** * @brief Tries to find a node for the specified key in the tree. * * @param[in] the_rbtree The red-black tree control. diff --git a/cpukit/score/src/rbtree.c b/cpukit/score/src/rbtree.c deleted file mode 100644 index 064cc0c19f..0000000000 --- a/cpukit/score/src/rbtree.c +++ /dev/null @@ -1,47 +0,0 @@ -/** - * @file - * - * @brief Initialize a RBTree Header - * @ingroup ScoreRBTree - */ - -/* - * Copyright (c) 2010 Gedare Bloom. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <rtems/system.h> -#include <rtems/score/address.h> -#include <rtems/score/rbtree.h> -#include <rtems/score/isr.h> - -void _RBTree_Initialize( - RBTree_Control *the_rbtree, - RBTree_Compare compare, - void *starting_address, - size_t number_nodes, - size_t node_size, - bool is_unique -) -{ - size_t count; - RBTree_Node *next; - - /* could do sanity checks here */ - _RBTree_Initialize_empty( the_rbtree ); - - count = number_nodes; - next = starting_address; - - while ( count-- ) { - _RBTree_Insert( the_rbtree, next, compare, is_unique ); - next = (RBTree_Node *) _Addresses_Add_offset( next, node_size ); - } -} |