summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/src/rbheap.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-07-12 14:22:22 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-07-15 10:03:48 -0500
commit64939bc9efcaf945b493e9c371901de33c3868a3 (patch)
treee196959688afe714c8c334f93598cb99234970e4 /cpukit/sapi/src/rbheap.c
parentrbtree: Delete unused functions (diff)
downloadrtems-64939bc9efcaf945b493e9c371901de33c3868a3.tar.bz2
rbtree: Reduce RBTree_Control size
Remove compare function and is unique indicator from the control structure. Rename RBTree_Compare_function to RBTree_Compare. Rename rtems_rbtree_compare_function to rtems_rbtree_compare. Provide C++ compatible initializers. Add compare function and is unique indicator to _RBTree_Find(), _RBTree_Insert(), rtems_rbtree_find() and rtems_rbtree_insert(). Remove _RBTree_Is_unique() and rtems_rbtree_is_unique(). Remove compare function and is unique indicator from _RBTree_Initialize_empty() and rtems_rbtree_initialize_empty().
Diffstat (limited to 'cpukit/sapi/src/rbheap.c')
-rw-r--r--cpukit/sapi/src/rbheap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpukit/sapi/src/rbheap.c b/cpukit/sapi/src/rbheap.c
index febd65f131..20338eb1bd 100644
--- a/cpukit/sapi/src/rbheap.c
+++ b/cpukit/sapi/src/rbheap.c
@@ -80,7 +80,7 @@ static void insert_into_tree(
rtems_rbheap_chunk *chunk
)
{
- _RBTree_Insert(tree, &chunk->tree_node);
+ rtems_rbtree_insert(tree, &chunk->tree_node, chunk_compare, true);
}
rtems_status_code rtems_rbheap_initialize(
@@ -107,7 +107,7 @@ rtems_status_code rtems_rbheap_initialize(
rtems_chain_initialize_empty(free_chain);
rtems_chain_initialize_empty(&control->spare_descriptor_chain);
- rtems_rbtree_initialize_empty(chunk_tree, chunk_compare, true);
+ rtems_rbtree_initialize_empty(chunk_tree);
control->alignment = alignment;
control->handler_arg = handler_arg;
control->extend_descriptors = extend_descriptors;
@@ -198,7 +198,7 @@ static rtems_rbheap_chunk *find(rtems_rbtree_control *chunk_tree, uintptr_t key)
rtems_rbheap_chunk chunk = { .begin = key };
return rtems_rbheap_chunk_of_node(
- _RBTree_Find(chunk_tree, &chunk.tree_node)
+ rtems_rbtree_find(chunk_tree, &chunk.tree_node, chunk_compare, true)
);
}
@@ -230,7 +230,7 @@ static void check_and_merge(
a->size += b->size;
rtems_chain_extract_unprotected(&b->chain_node);
add_to_chain(free_chain, b);
- _RBTree_Extract(chunk_tree, &b->tree_node);
+ rtems_rbtree_extract(chunk_tree, &b->tree_node);
}
}