From 3bf2bcc8c630aa68ad869bbe44197d8cc2370c72 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 4 Apr 2016 09:36:01 +0200 Subject: [PATCH] score: Delete _Chain_Get() 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 4bbdd530f6..d9254449e1 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 e3ae7fd21f..01356665a6 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 6b4afdf529..403508ddb8 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 40f9fd145c..166b58bfcc 100644 --- a/cpukit/score/include/rtems/score/chainimpl.h +++ b/cpukit/score/include/rtems/score/chainimpl.h @@ -79,22 +79,6 @@ void _Chain_Initialize( size_t node_size ); -/** - * @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. * diff --git a/cpukit/score/src/chainget.c b/cpukit/score/src/chainget.c deleted file mode 100644 index 86bdc2396b..0000000000 --- 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 -#include -#include -#include - -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; -}