forked from Imagelibrary/rtems
score/rbtree: replace _RBTree_Peek_unprotected with _RBTree_First.
This commit is contained in:
@@ -10,13 +10,11 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010 Gedare Bloom.
|
||||
* Copyright (c) 2010-2012 Gedare Bloom.
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _RTEMS_SCORE_RBTREE_H
|
||||
@@ -459,22 +457,6 @@ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Get_unprotected(
|
||||
return the_node;
|
||||
}
|
||||
|
||||
/** @brief Peek at the First Node (unprotected)
|
||||
*
|
||||
* This function returns a pointer to the first node, minimum if @a dir is 0
|
||||
* or maximum if @a dir is 1, from @a the_rbtree without extracting it.
|
||||
* It does NOT disable interrupts to ensure the atomicity of the peek.
|
||||
*
|
||||
* @retval NULL if @a the_rbtree is empty.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Peek_unprotected(
|
||||
const RBTree_Control *the_rbtree,
|
||||
RBTree_Direction dir
|
||||
)
|
||||
{
|
||||
return(the_rbtree->first[dir]);
|
||||
}
|
||||
|
||||
/** @brief Rotate the_node in the direction passed as second argument
|
||||
*
|
||||
* This routine rotates @a the_node to the direction @a dir, swapping
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2010 Gedare Bloom.
|
||||
* Copyright (c) 2010-2012 Gedare Bloom.
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
@@ -45,7 +43,7 @@ RBTree_Node *_RBTree_Peek(
|
||||
|
||||
return_node = NULL;
|
||||
_ISR_Disable( level );
|
||||
return_node = _RBTree_Peek_unprotected( the_rbtree, dir );
|
||||
return_node = _RBTree_First( the_rbtree, dir );
|
||||
_ISR_Enable( level );
|
||||
return return_node;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user