RTEMS: cpukit/libdl/rtl-chain-iterator.c File Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Functions
rtl-chain-iterator.c File Reference

RTEMS Run-Time Link Editor Chain Iterator. More...

`#include "rtl-chain-iterator.h"`

## Functions
bool | rtems_rtl_chain_iterate (rtems_chain_control *chain, rtems_chain_iterator iterator, void *data)
int | rtems_rtl_chain_count (rtems_chain_control *chain)

## Detailed Description

RTEMS Run-Time Link Editor Chain Iterator.

A means of executing an iterator on a chain.

## Function Documentation

## ◆ rtems_rtl_chain_count()

int rtems_rtl_chain_count | ( | rtems_chain_control * | chain | ) |

Count the number of nodes on the chain.

Parameters

  chain | The chain to count the nodes of.

Returns
  int The number of nodes.

## ◆ 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

  chain | The chain of nodes to iterator over.
  iterator | The iterator handler called once for each node.
  data | Pointer to the data used by the iterator.

Return values

  true | The whole chain was iterated over.
  false | The iterator returned false.