summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-08-18 06:21:17 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-09-01 09:07:08 +0200
commit509e8d7f4d683f08e1f81ec4610b93487cee7a77 (patch)
tree288313da0dc11992842e8e38acf9d26a2334d224
parentf71e67dc56c2a919ef32656806eba2e92a5faf76 (diff)
downloadrtems-509e8d7f4d683f08e1f81ec4610b93487cee7a77.tar.bz2
rbtree: Delete rtems_rbtree_find_control()
This function is hard to support in alternative implementations. It has no internal use case.
-rw-r--r--cpukit/sapi/include/rtems/rbtree.h10
-rw-r--r--cpukit/score/include/rtems/score/rbtree.h25
-rw-r--r--doc/user/rbtree.t1
-rw-r--r--testsuites/sptests/sprbtree01/init.c7
4 files changed, 0 insertions, 43 deletions
diff --git a/cpukit/sapi/include/rtems/rbtree.h b/cpukit/sapi/include/rtems/rbtree.h
index 26041890b2..271e4b5a6d 100644
--- a/cpukit/sapi/include/rtems/rbtree.h
+++ b/cpukit/sapi/include/rtems/rbtree.h
@@ -378,16 +378,6 @@ RTEMS_INLINE_ROUTINE rtems_rbtree_node *rtems_rbtree_peek_max(
}
/**
- * @copydoc _RBTree_Find_control()
- */
-RTEMS_INLINE_ROUTINE rtems_rbtree_control *rtems_rbtree_find_control(
- const rtems_rbtree_node *the_node
-)
-{
- return _RBTree_Find_control( the_node );
-}
-
-/**
* @copydoc _RBTree_Insert()
*/
RTEMS_INLINE_ROUTINE rtems_rbtree_node *rtems_rbtree_insert(
diff --git a/cpukit/score/include/rtems/score/rbtree.h b/cpukit/score/include/rtems/score/rbtree.h
index 3e56625c06..b44c09edb5 100644
--- a/cpukit/score/include/rtems/score/rbtree.h
+++ b/cpukit/score/include/rtems/score/rbtree.h
@@ -388,31 +388,6 @@ RTEMS_INLINE_ROUTINE bool _RBTree_Is_root(
}
/**
- * @brief Finds the red-black tree control given a node in the tree.
- *
- * In case the node is not a node of a tree, then this function yields
- * unpredictable results.
- *
- * @param[in] the_node The node of interest.
- *
- * @return The red-black tree control of the node.
- */
-RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_control(
- const RBTree_Node *the_node
-)
-{
- RBTree_Node *parent = the_node->parent;
- RBTree_Control *rbtree;
-
- do {
- rbtree = (RBTree_Control *) parent;
- parent = parent->parent;
- } while ( parent != NULL );
-
- return rbtree;
-}
-
-/**
* @brief Initialize this RBTree as empty.
*
* This routine initializes @a the_rbtree to contain zero nodes.
diff --git a/doc/user/rbtree.t b/doc/user/rbtree.t
index c90065b6ce..319d35bfe5 100644
--- a/doc/user/rbtree.t
+++ b/doc/user/rbtree.t
@@ -39,7 +39,6 @@ heap memory. The Red-Black Tree API provided by RTEMS is:
@item @code{@value{DIRPREFIX}rtems_rbtree_get_max} - Remove the maximum node from the red-black tree
@item @code{@value{DIRPREFIX}rtems_rbtree_peek_min} - Returns the minimum node from the red-black tree
@item @code{@value{DIRPREFIX}rtems_rbtree_peek_max} - Returns the maximum node from the red-black tree
-@item @code{@value{DIRPREFIX}rtems_rbtree_find_control} - Returns the control node of a red-black tree given a node in the tree.
@item @code{@value{DIRPREFIX}rtems_rbtree_insert} - Add the node to the red-black tree
@end itemize
diff --git a/testsuites/sptests/sprbtree01/init.c b/testsuites/sptests/sprbtree01/init.c
index c24d6483bb..0fe72a4e3f 100644
--- a/testsuites/sptests/sprbtree01/init.c
+++ b/testsuites/sptests/sprbtree01/init.c
@@ -2027,13 +2027,6 @@ rtems_task Init( rtems_task_argument ignored )
rtems_test_exit(0);
}
- p = rb_find_unique(&rbtree1, &search_node.Node);
- puts( "INIT - Verify rtems_rbtree_find_control" );
- if (rtems_rbtree_find_control(p) != &rbtree1) {
- puts ("INIT - ERROR ON RBTREE HEADER MISMATCH");
- rtems_test_exit(0);
- }
-
if ( _RBTree_Is_red( NULL ) != 0 )
puts ( "INIT - ERROR ON RBTREE NULL IS RED MISMATCH" );
if ( _RBTree_Is_red( rbtree1.root ) != 0 )