forked from Imagelibrary/rtems
score: Delete _Chain_Append_with_empty_check()
This function is not used in the score. Update #2555.
This commit is contained in:
@@ -750,20 +750,10 @@ RTEMS_INLINE_ROUTINE void rtems_chain_prepend_unprotected(
|
||||
* @retval true The chain was empty before the append.
|
||||
* @retval false The chain contained at least one node before the append.
|
||||
*/
|
||||
#if defined( RTEMS_SMP )
|
||||
bool rtems_chain_append_with_empty_check(
|
||||
rtems_chain_control *chain,
|
||||
rtems_chain_node *node
|
||||
);
|
||||
#else
|
||||
RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check(
|
||||
rtems_chain_control *chain,
|
||||
rtems_chain_node *node
|
||||
)
|
||||
{
|
||||
return _Chain_Append_with_empty_check( chain, node );
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Checks if the @a chain is empty and prepends the @a node.
|
||||
|
||||
@@ -89,8 +89,6 @@ void rtems_chain_prepend(
|
||||
chain_release( &lock_context );
|
||||
}
|
||||
|
||||
#if defined( RTEMS_SMP )
|
||||
|
||||
bool rtems_chain_append_with_empty_check(
|
||||
rtems_chain_control *chain,
|
||||
rtems_chain_node *node
|
||||
@@ -106,6 +104,8 @@ 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
|
||||
|
||||
@@ -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/chainappendempty.c src/chainprependempty.c src/chaingetempty.c \
|
||||
src/chainprependempty.c src/chaingetempty.c \
|
||||
src/chainnodecount.c \
|
||||
src/debugisthreaddispatchingallowed.c \
|
||||
src/interr.c src/isr.c src/wkspace.c src/wkstringduplicate.c
|
||||
|
||||
@@ -144,25 +144,6 @@ void _Chain_Append(
|
||||
Chain_Node *the_node
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Append a node and check if the chain was empty before.
|
||||
*
|
||||
* This routine appends the_node onto the end of the_chain.
|
||||
*
|
||||
* @param[in] the_chain is the chain to be operated upon.
|
||||
* @param[in] the_node is the node to be appended.
|
||||
*
|
||||
* @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_Append_with_empty_check(
|
||||
Chain_Control *the_chain,
|
||||
Chain_Node *the_node
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Prepend a node and check if the chain was empty before.
|
||||
*
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @ingroup ScoreChain
|
||||
*
|
||||
* @brief _Chain_Append_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_Append_with_empty_check(
|
||||
Chain_Control *chain,
|
||||
Chain_Node *node
|
||||
)
|
||||
{
|
||||
ISR_Level level;
|
||||
bool was_empty;
|
||||
|
||||
_ISR_Disable( level );
|
||||
was_empty = _Chain_Append_with_empty_check_unprotected( chain, node );
|
||||
_ISR_Enable( level );
|
||||
|
||||
return was_empty;
|
||||
}
|
||||
Reference in New Issue
Block a user