RTEMS CPU Kit with SuperCore  4.11.3
Typedefs | Functions
rtl-chain-iterator.h File Reference

RTEMS Run-Time Linker Chain Iterator. More...

#include <rtems/chain.h>
Include dependency graph for rtl-chain-iterator.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef bool(* rtems_chain_iterator) (rtems_chain_node *node, void *data)
 Chain iterator handler.
 

Functions

bool rtems_rtl_chain_iterate (rtems_chain_control *chain, rtems_chain_iterator iterator, void *data)
 Iterate a chain of nodes invoking the iterator handler. More...
 
int rtems_rtl_chain_count (rtems_chain_control *chain)
 Count the number of nodes on the chain. More...
 

Detailed Description

RTEMS Run-Time Linker Chain Iterator.

Function Documentation

◆ rtems_rtl_chain_count()

int rtems_rtl_chain_count ( rtems_chain_control chain)

Count the number of nodes on the chain.

Parameters
chainThe chain to count the nodes of.
Returns
int The number of nodes.

References rtems_rtl_chain_iterate().

◆ rtems_rtl_chain_iterate()

bool rtems_rtl_chain_iterate ( rtems_chain_control chain,
rtems_chain_iterator  iterator,
void *  data 
)

Iterate a chain of nodes invoking the iterator handler.

Supply a data pointer the iterator moves data between the invoker and the iterator.

The iterator allows removal of the node from the chain.

Parameters
chainThe chain of nodes to iterator over.
iteratorThe iterator handler called once for each node.
dataPointer to the data used by the iterator.
Return values
trueThe whole chain was iterated over.
falseThe iterator returned false.

References rtems_chain_first(), rtems_chain_is_tail(), and rtems_chain_next().

Referenced by rtems_rtl_chain_count(), and rtems_rtl_obj_synchronize_cache().