forked from Imagelibrary/rtems
score: Delete _Chain_Get()
This function is not used in the score. Update #2555.
This commit is contained in:
@@ -591,18 +591,9 @@ RTEMS_INLINE_ROUTINE void rtems_chain_extract_unprotected(
|
|||||||
*
|
*
|
||||||
* NOTE: It disables interrupts to ensure the atomicity of the get operation.
|
* NOTE: It disables interrupts to ensure the atomicity of the get operation.
|
||||||
*/
|
*/
|
||||||
#if defined( RTEMS_SMP )
|
|
||||||
rtems_chain_node *rtems_chain_get(
|
rtems_chain_node *rtems_chain_get(
|
||||||
rtems_chain_control *the_chain
|
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().
|
* @brief See _Chain_Get_unprotected().
|
||||||
|
|||||||
@@ -40,8 +40,6 @@ void rtems_chain_extract( rtems_chain_node *node )
|
|||||||
chain_release( &lock_context );
|
chain_release( &lock_context );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined( RTEMS_SMP )
|
|
||||||
|
|
||||||
rtems_chain_node *rtems_chain_get( rtems_chain_control *chain )
|
rtems_chain_node *rtems_chain_get( rtems_chain_control *chain )
|
||||||
{
|
{
|
||||||
rtems_chain_node *node;
|
rtems_chain_node *node;
|
||||||
@@ -54,8 +52,6 @@ rtems_chain_node *rtems_chain_get( rtems_chain_control *chain )
|
|||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* defined( RTEMS_SMP ) */
|
|
||||||
|
|
||||||
void rtems_chain_insert( rtems_chain_node *after_node, rtems_chain_node *node )
|
void rtems_chain_insert( rtems_chain_node *after_node, rtems_chain_node *node )
|
||||||
{
|
{
|
||||||
rtems_interrupt_lock_context lock_context;
|
rtems_interrupt_lock_context lock_context;
|
||||||
|
|||||||
@@ -346,7 +346,6 @@ libscore_a_SOURCES += src/userextaddset.c \
|
|||||||
|
|
||||||
## STD_C_FILES
|
## STD_C_FILES
|
||||||
libscore_a_SOURCES += src/chain.c src/chainappend.c \
|
libscore_a_SOURCES += src/chain.c src/chainappend.c \
|
||||||
src/chainget.c \
|
|
||||||
src/chainnodecount.c \
|
src/chainnodecount.c \
|
||||||
src/debugisthreaddispatchingallowed.c \
|
src/debugisthreaddispatchingallowed.c \
|
||||||
src/interr.c src/isr.c src/wkspace.c src/wkstringduplicate.c
|
src/interr.c src/isr.c src/wkspace.c src/wkstringduplicate.c
|
||||||
|
|||||||
@@ -79,22 +79,6 @@ void _Chain_Initialize(
|
|||||||
size_t node_size
|
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.
|
* @brief Append a node on the end of a chain.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -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;
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user