Changeset c72f132 in rtems for cpukit/sapi


Ignore:
Timestamp:
Aug 18, 2015, 4:05:05 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
d128b4f2
Parents:
1f242285
git-author:
Sebastian Huber <sebastian.huber@…> (08/18/15 04:05:05)
git-committer:
Sebastian Huber <sebastian.huber@…> (08/31/15 07:56:55)
Message:

rbheap: Avoid internal API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/src/rbheap.c

    r1f242285 rc72f132  
    211211}
    212212
    213 static rtems_rbheap_chunk *get_next(
    214   const rtems_rbheap_chunk *chunk,
    215   RBTree_Direction dir
    216 )
     213static rtems_rbheap_chunk *pred(const rtems_rbheap_chunk *chunk)
    217214{
    218215  return rtems_rbheap_chunk_of_node(
    219     _RBTree_Next(&chunk->tree_node, dir)
     216    rtems_rbtree_predecessor(&chunk->tree_node)
     217  );
     218}
     219
     220static rtems_rbheap_chunk *succ(const rtems_rbheap_chunk *chunk)
     221{
     222  return rtems_rbheap_chunk_of_node(
     223    rtems_rbtree_successor(&chunk->tree_node)
    220224  );
    221225}
     
    254258    if (chunk != NULL_PAGE) {
    255259      if (!rtems_rbheap_is_chunk_free(chunk)) {
    256         rtems_rbheap_chunk *pred = get_next(chunk, RBT_LEFT);
    257         rtems_rbheap_chunk *succ = get_next(chunk, RBT_RIGHT);
    258 
    259         check_and_merge(free_chain, chunk_tree, chunk, succ);
     260        check_and_merge(free_chain, chunk_tree, chunk, succ(chunk));
    260261        add_to_chain(free_chain, chunk);
    261         check_and_merge(free_chain, chunk_tree, chunk, pred);
     262        check_and_merge(free_chain, chunk_tree, chunk, pred(chunk));
    262263      } else {
    263264        sc = RTEMS_INCORRECT_STATE;
Note: See TracChangeset for help on using the changeset viewer.