[rtems commit] rbtree: Delete _RBTree_Is_first()
Sebastian Huber
sebh at rtems.org
Mon Aug 31 08:41:20 UTC 2015
Module: rtems
Branch: master
Commit: 3f49446e54b44f8f229855b7a7d323e976f3a570
Changeset: http://git.rtems.org/rtems/commit/?id=3f49446e54b44f8f229855b7a7d323e976f3a570
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Aug 21 05:40:07 2015 +0200
rbtree: Delete _RBTree_Is_first()
---
cpukit/sapi/include/rtems/rbtree.h | 4 ++--
cpukit/score/include/rtems/score/rbtree.h | 20 --------------------
2 files changed, 2 insertions(+), 22 deletions(-)
diff --git a/cpukit/sapi/include/rtems/rbtree.h b/cpukit/sapi/include/rtems/rbtree.h
index cf4cd60..8ea3430 100644
--- a/cpukit/sapi/include/rtems/rbtree.h
+++ b/cpukit/sapi/include/rtems/rbtree.h
@@ -224,7 +224,7 @@ RTEMS_INLINE_ROUTINE bool rtems_rbtree_is_min(
const rtems_rbtree_node *the_node
)
{
- return _RBTree_Is_first( the_rbtree, the_node, RBT_LEFT );
+ return rtems_rbtree_min( the_rbtree ) == the_node;
}
/**
@@ -238,7 +238,7 @@ RTEMS_INLINE_ROUTINE bool rtems_rbtree_is_max(
const rtems_rbtree_node *the_node
)
{
- return _RBTree_Is_first( the_rbtree, the_node, RBT_RIGHT );
+ return rtems_rbtree_max( the_rbtree ) == the_node;
}
/**
diff --git a/cpukit/score/include/rtems/score/rbtree.h b/cpukit/score/include/rtems/score/rbtree.h
index 9c5bf65..d6d7b34 100644
--- a/cpukit/score/include/rtems/score/rbtree.h
+++ b/cpukit/score/include/rtems/score/rbtree.h
@@ -402,26 +402,6 @@ RTEMS_INLINE_ROUTINE bool _RBTree_Is_empty(
}
/**
- * @brief Is this the first node on the RBTree.
- *
- * This function returns true if @a the_node is the first node on
- * @a the_rbtree and false otherwise. @a dir specifies whether first means
- * minimum (0) or maximum (1).
- *
- * @retval true @a the_node is the first node on @a the_rbtree.
- * @retval false @a the_node is not the first node on @a the_rbtree.
- *
- */
-RTEMS_INLINE_ROUTINE bool _RBTree_Is_first(
- const RBTree_Control *the_rbtree,
- const RBTree_Node *the_node,
- RBTree_Direction dir
-)
-{
- return (the_node == _RBTree_First(the_rbtree, dir));
-}
-
-/**
* @brief Returns true if this node is the root node of a red-black tree, and
* false otherwise.
*
More information about the vc
mailing list