[PATCH 11/15] score: Delete _Chain_Get_with_empty_check()

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Apr 5 13:09:56 UTC 2016


This function is not used in the score.

Update #2555.
---
 cpukit/sapi/include/rtems/chain.h            | 10 -------
 cpukit/sapi/src/chainprotected.c             |  4 ---
 cpukit/score/Makefile.am                     |  1 -
 cpukit/score/include/rtems/score/chainimpl.h | 25 ----------------
 cpukit/score/src/chaingetempty.c             | 44 ----------------------------
 5 files changed, 84 deletions(-)
 delete mode 100644 cpukit/score/src/chaingetempty.c

diff --git a/cpukit/sapi/include/rtems/chain.h b/cpukit/sapi/include/rtems/chain.h
index 887623b..f776890 100644
--- a/cpukit/sapi/include/rtems/chain.h
+++ b/cpukit/sapi/include/rtems/chain.h
@@ -780,20 +780,10 @@ bool rtems_chain_prepend_with_empty_check(
  * @retval true The chain is empty after the node removal.
  * @retval false The chain contained at least one node after the node removal.
  */
-#if defined( RTEMS_SMP )
 bool rtems_chain_get_with_empty_check(
   rtems_chain_control *chain,
   rtems_chain_node **node
 );
-#else
-RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check(
-  rtems_chain_control *chain,
-  rtems_chain_node **node
-)
-{
-  return _Chain_Get_with_empty_check( chain, node );
-}
-#endif
 
 /**
  * @brief Returns the node count of the chain.
diff --git a/cpukit/sapi/src/chainprotected.c b/cpukit/sapi/src/chainprotected.c
index 087c8e7..3d59348 100644
--- a/cpukit/sapi/src/chainprotected.c
+++ b/cpukit/sapi/src/chainprotected.c
@@ -119,8 +119,6 @@ bool rtems_chain_prepend_with_empty_check(
   return was_empty;
 }
 
-#if defined( RTEMS_SMP )
-
 bool rtems_chain_get_with_empty_check(
   rtems_chain_control *chain,
   rtems_chain_node **node
@@ -135,5 +133,3 @@ bool rtems_chain_get_with_empty_check(
 
   return is_empty_now;
 }
-
-#endif /* defined( RTEMS_SMP ) */
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
index 914fa3a..fa789d1 100644
--- a/cpukit/score/Makefile.am
+++ b/cpukit/score/Makefile.am
@@ -347,7 +347,6 @@ libscore_a_SOURCES += src/userextaddset.c \
 ## STD_C_FILES
 libscore_a_SOURCES += src/chain.c src/chainappend.c \
     src/chainextract.c src/chainget.c src/chaininsert.c \
-    src/chaingetempty.c \
     src/chainnodecount.c \
     src/debugisthreaddispatchingallowed.c \
     src/interr.c src/isr.c src/wkspace.c src/wkstringduplicate.c
diff --git a/cpukit/score/include/rtems/score/chainimpl.h b/cpukit/score/include/rtems/score/chainimpl.h
index f23fab8..fa9a046 100644
--- a/cpukit/score/include/rtems/score/chainimpl.h
+++ b/cpukit/score/include/rtems/score/chainimpl.h
@@ -145,31 +145,6 @@ void _Chain_Append(
 );
 
 /**
- * @brief Get the first node and check if the chain is empty afterwards.
- *
- * This function removes the first node from the_chain and returns
- * a pointer to that node in @a the_node.  If the_chain is empty, then NULL is
- * returned.
- *
- * @param[in] the_chain is the chain to attempt to get the first node from.
- * @param[out] the_node is the first node on the chain or NULL if the chain is
- * empty.
- *
- * @note It disables interrupts to ensure the atomicity of the append
- * operation.
- *
- * @retval true The chain is empty now.
- * @retval false The chain contains at least one node now.
- *
- *  - INTERRUPT LATENCY:
- *    + single case
- */
-bool _Chain_Get_with_empty_check(
-  Chain_Control *the_chain,
-  Chain_Node **the_node
-);
-
-/**
  * @brief Returns the node count of the chain.
  *
  * @param[in] chain The chain.
diff --git a/cpukit/score/src/chaingetempty.c b/cpukit/score/src/chaingetempty.c
deleted file mode 100644
index 1efec77..0000000
--- a/cpukit/score/src/chaingetempty.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * @file
- *
- * @ingroup ScoreChain
- *
- * @brief _Chain_Get_with_empty_check() implementation.
- */
-
-/*
- * Copyright (c) 2010 embedded brains GmbH.  All rights reserved.
- *
- *  embedded brains GmbH
- *  Obere Lagerstr. 30
- *  82178 Puchheim
- *  Germany
- *  <rtems at embedded-brains.de>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/system.h>
-#include <rtems/score/chainimpl.h>
-#include <rtems/score/isr.h>
-
-bool _Chain_Get_with_empty_check(
-  Chain_Control *chain,
-  Chain_Node **node
-)
-{
-  ISR_Level level;
-  bool is_empty_now;
-
-  _ISR_Disable( level );
-  is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node );
-  _ISR_Enable( level );
-
-  return is_empty_now;
-}
-- 
1.8.4.5




More information about the devel mailing list