[PATCH 14/15] score: Delete _Chain_Get()
Sebastian Huber
sebastian.huber at embedded-brains.de
Tue Apr 5 13:09:59 UTC 2016
This function is not used in the score.
Update #2555.
---
cpukit/sapi/include/rtems/chain.h | 9 -------
cpukit/sapi/src/chainprotected.c | 4 ---
cpukit/score/Makefile.am | 1 -
cpukit/score/include/rtems/score/chainimpl.h | 16 ------------
cpukit/score/src/chainget.c | 39 ----------------------------
5 files changed, 69 deletions(-)
delete mode 100644 cpukit/score/src/chainget.c
diff --git a/cpukit/sapi/include/rtems/chain.h b/cpukit/sapi/include/rtems/chain.h
index 4bbdd53..d925444 100644
--- a/cpukit/sapi/include/rtems/chain.h
+++ b/cpukit/sapi/include/rtems/chain.h
@@ -591,18 +591,9 @@ RTEMS_INLINE_ROUTINE void rtems_chain_extract_unprotected(
*
* NOTE: It disables interrupts to ensure the atomicity of the get operation.
*/
-#if defined( RTEMS_SMP )
rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
);
-#else
-RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
- rtems_chain_control *the_chain
-)
-{
- return _Chain_Get( the_chain );
-}
-#endif
/**
* @brief See _Chain_Get_unprotected().
diff --git a/cpukit/sapi/src/chainprotected.c b/cpukit/sapi/src/chainprotected.c
index e3ae7fd..0135666 100644
--- a/cpukit/sapi/src/chainprotected.c
+++ b/cpukit/sapi/src/chainprotected.c
@@ -40,8 +40,6 @@ void rtems_chain_extract( rtems_chain_node *node )
chain_release( &lock_context );
}
-#if defined( RTEMS_SMP )
-
rtems_chain_node *rtems_chain_get( rtems_chain_control *chain )
{
rtems_chain_node *node;
@@ -54,8 +52,6 @@ rtems_chain_node *rtems_chain_get( rtems_chain_control *chain )
return node;
}
-#endif /* defined( RTEMS_SMP ) */
-
void rtems_chain_insert( rtems_chain_node *after_node, rtems_chain_node *node )
{
rtems_interrupt_lock_context lock_context;
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
index 6b4afdf..403508d 100644
--- a/cpukit/score/Makefile.am
+++ b/cpukit/score/Makefile.am
@@ -346,7 +346,6 @@ libscore_a_SOURCES += src/userextaddset.c \
## STD_C_FILES
libscore_a_SOURCES += src/chain.c src/chainappend.c \
- src/chainget.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 40f9fd1..166b58b 100644
--- a/cpukit/score/include/rtems/score/chainimpl.h
+++ b/cpukit/score/include/rtems/score/chainimpl.h
@@ -80,22 +80,6 @@ void _Chain_Initialize(
);
/**
- * @brief Obtain the first node on a chain.
- *
- * This function removes the first node from @a the_chain and returns
- * a pointer to that node. If @a the_chain is empty, then NULL is returned.
- *
- * @retval This method returns a pointer a node. If a node was removed,
- * then a pointer to that node is returned. If @a the_chain was
- * empty, then NULL is returned.
- *
- * @note It disables interrupts to ensure the atomicity of the get operation.
- */
-Chain_Node *_Chain_Get(
- Chain_Control *the_chain
-);
-
-/**
* @brief Append a node on the end of a chain.
*
* This routine appends @a the_node onto the end of @a the_chain.
diff --git a/cpukit/score/src/chainget.c b/cpukit/score/src/chainget.c
deleted file mode 100644
index 86bdc23..0000000
--- a/cpukit/score/src/chainget.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * @file
- *
- * @brief Get the First Node
- * @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_Node *_Chain_Get(
- Chain_Control *the_chain
-)
-{
- ISR_Level level;
- Chain_Node *return_node;
-
- return_node = NULL;
- _ISR_Disable( level );
- if ( !_Chain_Is_empty( the_chain ) )
- return_node = _Chain_Get_first_unprotected( the_chain );
- _ISR_Enable( level );
- return return_node;
-}
--
1.8.4.5
More information about the devel
mailing list