Changeset 341f629 in rtems for cpukit/sapi


Ignore:
Timestamp:
Aug 21, 2015, 3:39:59 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
3f49446
Parents:
d7c93070
git-author:
Sebastian Huber <sebastian.huber@…> (08/21/15 03:39:59)
git-committer:
Sebastian Huber <sebastian.huber@…> (08/31/15 07:59:41)
Message:

rbtree: Add _RBTree_Minimum(), _RBTree_Maximum()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/include/rtems/rbtree.h

    rd7c93070 r341f629  
    148148
    149149/**
    150  * @brief Return pointer to RBTree Minimum
    151  *
    152  * This function returns a pointer to the minimum node of @a the_rbtree.
     150 * @copydoc _RBTree_Minimum()
    153151 */
    154152RTEMS_INLINE_ROUTINE rtems_rbtree_node *rtems_rbtree_min(
     
    156154)
    157155{
    158   return _RBTree_First( the_rbtree, RBT_LEFT );
    159 }
    160 
    161 /**
    162  * @brief Return pointer to RBTree maximum.
    163  *
    164  * This function returns a pointer to the maximum node of @a the_rbtree.
     156  return _RBTree_Minimum( the_rbtree );
     157}
     158
     159/**
     160 * @copydoc _RBTree_Maximum()
    165161 */
    166162RTEMS_INLINE_ROUTINE rtems_rbtree_node *rtems_rbtree_max(
     
    168164)
    169165{
    170   return _RBTree_First( the_rbtree, RBT_RIGHT );
     166  return _RBTree_Maximum( the_rbtree );
    171167}
    172168
     
    339335)
    340336{
    341   return _RBTree_First( the_rbtree, RBT_LEFT );
     337  return rtems_rbtree_min( the_rbtree );
    342338}
    343339
     
    353349)
    354350{
    355   return _RBTree_First( the_rbtree, RBT_RIGHT );
     351  return rtems_rbtree_max( the_rbtree );
    356352}
    357353
Note: See TracChangeset for help on using the changeset viewer.