From 833dd903356eae776975fc8e43a96687430f2e64 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 19 Nov 2013 16:09:39 +0100 Subject: score/rbtree: Delete protected operations The user of the red-black tree container must now ensure that at most one thread at once can access an instance. --- cpukit/sapi/include/rtems/rbtree.h | 112 ------------------------------------- 1 file changed, 112 deletions(-) (limited to 'cpukit/sapi/include/rtems') diff --git a/cpukit/sapi/include/rtems/rbtree.h b/cpukit/sapi/include/rtems/rbtree.h index bce7013fd9..5cbdab46c2 100644 --- a/cpukit/sapi/include/rtems/rbtree.h +++ b/cpukit/sapi/include/rtems/rbtree.h @@ -309,23 +309,6 @@ RTEMS_INLINE_ROUTINE rtems_rbtree_node* rtems_rbtree_find_unprotected( return _RBTree_Find_unprotected( the_rbtree, the_node ); } -/** @brief Find the node with given key in the tree. - * - * This function returns a pointer to the node having key equal to the key - * of @a the_node if it exists within @a the_rbtree, and NULL if not. - * @a the_node has to be made up before a search. - * - * @note If the tree is not unique and contains duplicate keys, the set - * of duplicate keys acts as FIFO. - */ -RTEMS_INLINE_ROUTINE rtems_rbtree_node* rtems_rbtree_find( - const rtems_rbtree_control *the_rbtree, - const rtems_rbtree_node *the_node -) -{ - return _RBTree_Find( the_rbtree, the_node ); -} - /** * @copydoc _RBTree_Predecessor_unprotected() */ @@ -336,16 +319,6 @@ RTEMS_INLINE_ROUTINE rtems_rbtree_node* rtems_rbtree_predecessor_unprotected( return _RBTree_Predecessor_unprotected( node ); } -/** - * @copydoc _RBTree_Predecessor() - */ -RTEMS_INLINE_ROUTINE rtems_rbtree_node* rtems_rbtree_predecessor( - const rtems_rbtree_node *node -) -{ - return _RBTree_Predecessor( node ); -} - /** * @copydoc _RBTree_Successor_unprotected() */ @@ -356,16 +329,6 @@ RTEMS_INLINE_ROUTINE rtems_rbtree_node* rtems_rbtree_successor_unprotected( return _RBTree_Successor_unprotected( node ); } -/** - * @copydoc _RBTree_Successor() - */ -RTEMS_INLINE_ROUTINE rtems_rbtree_node* rtems_rbtree_successor( - const rtems_rbtree_node *node -) -{ - return _RBTree_Successor( node ); -} - /** * @copydoc _RBTree_Extract_unprotected() */ @@ -377,20 +340,6 @@ RTEMS_INLINE_ROUTINE void rtems_rbtree_extract_unprotected( _RBTree_Extract_unprotected( the_rbtree, the_node ); } -/** - * @brief Extract the specified node from a rbtree. - * - * This routine extracts @a the_node from @a the_rbtree on which it resides. - * It disables interrupts to ensure the atomicity of the extract operation. - */ -RTEMS_INLINE_ROUTINE void rtems_rbtree_extract( - rtems_rbtree_control *the_rbtree, - rtems_rbtree_node *the_node -) -{ - _RBTree_Extract( the_rbtree, the_node ); -} - /** * @brief Obtain the min node on a rbtree. * @@ -405,20 +354,6 @@ RTEMS_INLINE_ROUTINE rtems_rbtree_node *rtems_rbtree_get_min_unprotected( return _RBTree_Get_unprotected( the_rbtree, RBT_LEFT ); } -/** - * @brief Obtain the min node on a rbtree. - * - * This function removes the min node from @a the_rbtree and returns - * a pointer to that node. If @a the_rbtree is empty, then NULL is returned. - * It disables interrupts to ensure the atomicity of the get operation. - */ -RTEMS_INLINE_ROUTINE rtems_rbtree_node *rtems_rbtree_get_min( - rtems_rbtree_control *the_rbtree -) -{ - return _RBTree_Get( the_rbtree, RBT_LEFT ); -} - /** * @brief Obtain the max node on a rbtree. * @@ -433,20 +368,6 @@ RTEMS_INLINE_ROUTINE rtems_rbtree_node *rtems_rbtree_get_max_unprotected( return _RBTree_Get_unprotected( the_rbtree, RBT_RIGHT ); } -/** - * @brief Obtain the max node on a rbtree. - * - * This function removes the max node from @a the_rbtree and returns - * a pointer to that node. If @a the_rbtree is empty, then NULL is returned. - * It disables interrupts to ensure the atomicity of the get operation. - */ -RTEMS_INLINE_ROUTINE rtems_rbtree_node *rtems_rbtree_get_max( - rtems_rbtree_control *the_rbtree -) -{ - return _RBTree_Get( the_rbtree, RBT_RIGHT ); -} - /** * @brief Peek at the min node on a rbtree. * @@ -485,20 +406,6 @@ RTEMS_INLINE_ROUTINE rtems_rbtree_control *rtems_rbtree_find_header_unprotected( return _RBTree_Find_header_unprotected( the_node ); } -/** - * @brief Find the control header of the tree containing a given node. - * - * This routine finds the rtems_rbtree_control structure of the tree - * containing @a the_node. - * It disables interrupts to ensure the atomicity of the find operation. - */ -RTEMS_INLINE_ROUTINE rtems_rbtree_control *rtems_rbtree_find_header( - rtems_rbtree_node *the_node -) -{ - return _RBTree_Find_header( the_node ); -} - /** * @copydoc _RBTree_Insert_unprotected() */ @@ -510,25 +417,6 @@ RTEMS_INLINE_ROUTINE rtems_rbtree_node *rtems_rbtree_insert_unprotected( return _RBTree_Insert_unprotected( the_rbtree, the_node ); } -/** - * @brief Insert a node on a rbtree. - * - * This routine inserts @a the_node on @a the_rbtree. - * It disables interrupts to ensure the atomicity of the insert operation. - * - * @retval 0 Successfully inserted. - * @retval -1 NULL @a the_node. - * @retval RBTree_Node* if one with equal key to the key of @a the_node exists - * in an unique @a the_rbtree. - */ -RTEMS_INLINE_ROUTINE rtems_rbtree_node *rtems_rbtree_insert( - rtems_rbtree_control *the_rbtree, - rtems_rbtree_node *the_node -) -{ - return _RBTree_Insert( the_rbtree, the_node ); -} - /** * @brief Determines whether the tree is unique. */ -- cgit v1.2.3