[PATCH 4/4] score/rbtree: eliminate unused function _RBTree_Peek.
Joel Sherrill
joel.sherrill at OARcorp.com
Wed May 2 17:03:35 UTC 2012
Hard patch to argue against. OK to commit when
the time is right.
On 05/02/2012 11:35 AM, Gedare Bloom wrote:
> ---
> cpukit/score/Makefile.am | 3 +-
> cpukit/score/include/rtems/score/rbtree.h | 17 ----------
> cpukit/score/src/rbtreepeek.c | 49 -----------------------------
> 3 files changed, 1 insertions(+), 68 deletions(-)
> delete mode 100644 cpukit/score/src/rbtreepeek.c
>
> diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
> index 2f12905..2ff6b54 100644
> --- a/cpukit/score/Makefile.am
> +++ b/cpukit/score/Makefile.am
> @@ -265,8 +265,7 @@ libscore_a_SOURCES += src/pheapallocate.c \
> ## RBTREE_C_FILES
> libscore_a_SOURCES += src/rbtree.c \
> src/rbtreeextract.c src/rbtreefind.c src/rbtreefindheader.c \
> - src/rbtreeget.c src/rbtreeinsert.c src/rbtreepeek.c src/rbtreenext.c \
> - src/rbtreeiterate.c
> + src/rbtreeget.c src/rbtreeinsert.c src/rbtreeiterate.c src/rbtreenext.c
>
> ## THREAD_C_FILES
> libscore_a_SOURCES += src/thread.c src/threadchangepriority.c \
> diff --git a/cpukit/score/include/rtems/score/rbtree.h b/cpukit/score/include/rtems/score/rbtree.h
> index 2e9bb83..d98392e 100644
> --- a/cpukit/score/include/rtems/score/rbtree.h
> +++ b/cpukit/score/include/rtems/score/rbtree.h
> @@ -220,23 +220,6 @@ RBTree_Node *_RBTree_Get(
> );
>
> /**
> - * @brief Check the min or max node on a rbtree
> - *
> - * This function returns a pointer to the min or max node of @a the_rbtree.
> - * If @a the_rbtree is empty, then NULL is returned. @a dir specifies
> - * whether to return the min (0) or max (1).
> - *
> - * @return This method returns a pointer to a node.
> - * If @a the_rbtree was empty, then NULL is returned.
> - *
> - * @note It disables interrupts to ensure the atomicity of the get operation.
> - */
> -RBTree_Node *_RBTree_Peek(
> - const RBTree_Control *the_rbtree,
> - RBTree_Direction dir
> -);
> -
> -/**
> * @brief Find the node with given key in the tree
> *
> * This function returns a pointer to the node with key equal to a key
> diff --git a/cpukit/score/src/rbtreepeek.c b/cpukit/score/src/rbtreepeek.c
> deleted file mode 100644
> index 81ff0fd..0000000
> --- a/cpukit/score/src/rbtreepeek.c
> +++ /dev/null
> @@ -1,49 +0,0 @@
> -/*
> - * 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.
> - */
> -
> -#if HAVE_CONFIG_H
> -#include "config.h"
> -#endif
> -
> -#include<rtems/system.h>
> -#include<rtems/score/address.h>
> -#include<rtems/score/rbtree.h>
> -#include<rtems/score/isr.h>
> -
> -/*
> - * _RBTree_Get
> - *
> - * This kernel routine returns a pointer to the min or max node on the tree,
> - * without removing that node.
> - *
> - * Input parameters:
> - * the_rbtree - pointer to rbtree header
> - * dir - specifies whether to return minimum (0) or maximum (1)
> - *
> - * Output parameters:
> - * return_node - pointer to node in rbtree allocated
> - * NULL - if no nodes available
> - *
> - * INTERRUPT LATENCY:
> - * only case
> - */
> -
> -RBTree_Node *_RBTree_Peek(
> - const RBTree_Control *the_rbtree,
> - RBTree_Direction dir
> -)
> -{
> - ISR_Level level;
> - RBTree_Node *return_node;
> -
> - return_node = NULL;
> - _ISR_Disable( level );
> - return_node = _RBTree_First( the_rbtree, dir );
> - _ISR_Enable( level );
> - return return_node;
> -}
--
Joel Sherrill, Ph.D. Director of Research& Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the devel
mailing list