[rtems commit] score/rbtree: eliminate unused function _RBTree_Peek.

Gedare Bloom gedare at rtems.org
Tue May 8 22:37:56 UTC 2012


Module:    rtems
Branch:    master
Commit:    0f31ec5d3ba1b7d9a8908588d3d92d340aa03eed
Changeset: http://git.rtems.org/rtems/commit/?id=0f31ec5d3ba1b7d9a8908588d3d92d340aa03eed

Author:    Gedare Bloom <gedare at rtems.org>
Date:      Wed May  2 12:15:55 2012 -0400

score/rbtree: eliminate unused function _RBTree_Peek.

---

 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(-)

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;
-}




More information about the vc mailing list