[PATCH 15/15] score: Delete _Chain_Append()

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Apr 5 13:10:00 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                     |  2 +-
 cpukit/score/include/rtems/score/chainimpl.h | 13 -------
 cpukit/score/src/chainappend.c               | 51 ----------------------------
 5 files changed, 1 insertion(+), 79 deletions(-)
 delete mode 100644 cpukit/score/src/chainappend.c

diff --git a/cpukit/sapi/include/rtems/chain.h b/cpukit/sapi/include/rtems/chain.h
index d925444..3d8a860 100644
--- a/cpukit/sapi/include/rtems/chain.h
+++ b/cpukit/sapi/include/rtems/chain.h
@@ -648,20 +648,10 @@ RTEMS_INLINE_ROUTINE void rtems_chain_insert_unprotected(
  * NOTE: It disables interrupts to ensure the atomicity of the
  * append operation.
  */
-#if defined( RTEMS_SMP )
 void rtems_chain_append(
   rtems_chain_control *the_chain,
   rtems_chain_node    *the_node
 );
-#else
-RTEMS_INLINE_ROUTINE void rtems_chain_append(
-  rtems_chain_control *the_chain,
-  rtems_chain_node    *the_node
-)
-{
-  _Chain_Append( the_chain, the_node );
-}
-#endif
 
 /**
  * @brief Append a node on the end of a chain (unprotected).
diff --git a/cpukit/sapi/src/chainprotected.c b/cpukit/sapi/src/chainprotected.c
index 0135666..868e3d8 100644
--- a/cpukit/sapi/src/chainprotected.c
+++ b/cpukit/sapi/src/chainprotected.c
@@ -61,8 +61,6 @@ void rtems_chain_insert( rtems_chain_node *after_node, rtems_chain_node *node )
   chain_release( &lock_context );
 }
 
-#if defined( RTEMS_SMP )
-
 void rtems_chain_append(
   rtems_chain_control *chain,
   rtems_chain_node *node
@@ -75,8 +73,6 @@ void rtems_chain_append(
   chain_release( &lock_context );
 }
 
-#endif /* defined( RTEMS_SMP ) */
-
 void rtems_chain_prepend(
   rtems_chain_control *chain,
   rtems_chain_node *node
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
index 403508d..455c99d 100644
--- a/cpukit/score/Makefile.am
+++ b/cpukit/score/Makefile.am
@@ -345,7 +345,7 @@ libscore_a_SOURCES += src/userextaddset.c \
     src/userext.c src/userextremoveset.c src/userextiterate.c
 
 ## STD_C_FILES
-libscore_a_SOURCES += src/chain.c src/chainappend.c \
+libscore_a_SOURCES += src/chain.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 166b58b..ff66d46 100644
--- a/cpukit/score/include/rtems/score/chainimpl.h
+++ b/cpukit/score/include/rtems/score/chainimpl.h
@@ -80,19 +80,6 @@ void _Chain_Initialize(
 );
 
 /**
- *  @brief Append a node on the end of a chain.
- *
- *  This routine appends @a the_node onto the end of @a the_chain.
- *
- *  @note It disables interrupts to ensure the atomicity of the
- *  append operation.
- */
-void _Chain_Append(
-  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/chainappend.c b/cpukit/score/src/chainappend.c
deleted file mode 100644
index 09c66ec..0000000
--- a/cpukit/score/src/chainappend.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * @file
- *
- * @brief Append a Node on the End of a Chain
- * @ingroup ScoreChain
-*/
-
-/*
- *  COPYRIGHT (c) 1989-2007.
- *  On-Line Applications Research Corporation (OAR).
- *
- *  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/address.h>
-#include <rtems/score/chainimpl.h>
-#include <rtems/score/isr.h>
-
-/*
- *  _Chain_Append
- *
- *  This kernel routine puts a node on the end of the specified chain.
- *
- *  Input parameters:
- *    the_chain - pointer to chain header
- *    node      - address of node to put at rear of chain
- *
- *  Output parameters:  NONE
- *
- *  INTERRUPT LATENCY:
- *    only case
- */
-
-void _Chain_Append(
-  Chain_Control *the_chain,
-  Chain_Node    *node
-)
-{
-  ISR_Level level;
-
-  _ISR_Disable( level );
-    _Chain_Append_unprotected( the_chain, node );
-  _ISR_Enable( level );
-}
-- 
1.8.4.5




More information about the devel mailing list