summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-04 09:24:47 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-06 09:08:23 +0200
commitc13038798501933e9ee33bbfa7f49010281c5158 (patch)
tree343c1dea3acceb53a76849fc35d3b8c55004e3d5
parentscore: Delete _Chain_Append_with_empty_check() (diff)
downloadrtems-c13038798501933e9ee33bbfa7f49010281c5158.tar.bz2
score: Delete _Chain_Prepend_with_empty_check()
This function is not used in the score. Update #2555.
-rw-r--r--cpukit/sapi/include/rtems/chain.h10
-rw-r--r--cpukit/sapi/src/chainprotected.c4
-rw-r--r--cpukit/score/Makefile.am2
-rw-r--r--cpukit/score/include/rtems/score/chainimpl.h19
-rw-r--r--cpukit/score/src/chainprependempty.c44
5 files changed, 3 insertions, 76 deletions
diff --git a/cpukit/sapi/include/rtems/chain.h b/cpukit/sapi/include/rtems/chain.h
index 01d743f972..887623be7f 100644
--- a/cpukit/sapi/include/rtems/chain.h
+++ b/cpukit/sapi/include/rtems/chain.h
@@ -763,20 +763,10 @@ bool rtems_chain_append_with_empty_check(
* @retval true The chain was empty before the prepend.
* @retval false The chain contained at least one node before the prepend.
*/
-#if defined( RTEMS_SMP )
bool rtems_chain_prepend_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
);
-#else
-RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check(
- rtems_chain_control *chain,
- rtems_chain_node *node
-)
-{
- return _Chain_Prepend_with_empty_check( chain, node );
-}
-#endif
/**
* @brief Tries to get the first @a node and check if the @a chain is empty
diff --git a/cpukit/sapi/src/chainprotected.c b/cpukit/sapi/src/chainprotected.c
index 51842f4d13..087c8e7fb8 100644
--- a/cpukit/sapi/src/chainprotected.c
+++ b/cpukit/sapi/src/chainprotected.c
@@ -104,8 +104,6 @@ bool rtems_chain_append_with_empty_check(
return was_empty;
}
-#if defined( RTEMS_SMP )
-
bool rtems_chain_prepend_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
@@ -121,6 +119,8 @@ 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
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
index 93490dc80c..914fa3a7fb 100644
--- a/cpukit/score/Makefile.am
+++ b/cpukit/score/Makefile.am
@@ -347,7 +347,7 @@ 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/chainprependempty.c src/chaingetempty.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 4153107473..f23fab8f27 100644
--- a/cpukit/score/include/rtems/score/chainimpl.h
+++ b/cpukit/score/include/rtems/score/chainimpl.h
@@ -145,25 +145,6 @@ void _Chain_Append(
);
/**
- * @brief Prepend a node and check if the chain was empty before.
- *
- * This routine prepends the_node onto the front of the_chain.
- *
- * @param[in] the_chain is the chain to be operated upon.
- * @param[in] the_node is the node to be prepended.
- *
- * @note It disables interrupts to ensure the atomicity of the append
- * operation.
- *
- * @retval true The chain was empty before.
- * @retval false The chain contained at least one node before.
- */
-bool _Chain_Prepend_with_empty_check(
- Chain_Control *the_chain,
- Chain_Node *the_node
-);
-
-/**
* @brief Get the first node and check if the chain is empty afterwards.
*
* This function removes the first node from the_chain and returns
diff --git a/cpukit/score/src/chainprependempty.c b/cpukit/score/src/chainprependempty.c
deleted file mode 100644
index f83d628726..0000000000
--- a/cpukit/score/src/chainprependempty.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * @file
- *
- * @ingroup ScoreChain
- *
- * @brief _Chain_Prepend_with_empty_check() implementation.
- */
-
-/*
- * Copyright (c) 2010 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@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_Prepend_with_empty_check(
- Chain_Control *chain,
- Chain_Node *node
-)
-{
- ISR_Level level;
- bool was_empty;
-
- _ISR_Disable( level );
- was_empty = _Chain_Prepend_with_empty_check_unprotected( chain, node );
- _ISR_Enable( level );
-
- return was_empty;
-}