5
Last change
on this file since f59d435d was
d4edbdbc,
checked in by Sebastian Huber <sebastian.huber@…>, on 03/20/15 at 13:09:26
|
Replace www.rtems.com with www.rtems.org
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
Line | |
---|
1 | /* |
---|
2 | * COPYRIGHT (c) 2012 Chris Johns <chrisj@rtems.org> |
---|
3 | * |
---|
4 | * The license and distribution terms for this file may be |
---|
5 | * found in the file LICENSE in this distribution or at |
---|
6 | * http://www.rtems.org/license/LICENSE. |
---|
7 | */ |
---|
8 | /** |
---|
9 | * @file |
---|
10 | * |
---|
11 | * @ingroup rtems_rtl |
---|
12 | * |
---|
13 | * @brief RTEMS Run-Time Linker Chain Iterator. |
---|
14 | */ |
---|
15 | |
---|
16 | #if !defined (_RTEMS_RTL_CHAIN_ITERATOR_H_) |
---|
17 | #define _RTEMS_RTL_CHAIN_ITERATOR_H_ |
---|
18 | |
---|
19 | #ifdef __cplusplus |
---|
20 | extern "C" { |
---|
21 | #endif /* __cplusplus */ |
---|
22 | |
---|
23 | #include <rtems/chain.h> |
---|
24 | |
---|
25 | /** |
---|
26 | * Chain iterator handler. |
---|
27 | */ |
---|
28 | typedef bool (*rtems_chain_iterator) (rtems_chain_node* node, void* data); |
---|
29 | |
---|
30 | /** |
---|
31 | * Iterate a chain of nodes invoking the iterator handler. Supply a data |
---|
32 | * pointer the iterator moves data between the invoker and the iterator. |
---|
33 | * |
---|
34 | * The iterator allows removal of the node from the chain. |
---|
35 | * |
---|
36 | * @param chain The chain of nodes to iterator over. |
---|
37 | * @param iterator The iterator handler called once for each node. |
---|
38 | * @param data Pointer to the data used by the iterator. |
---|
39 | * @retval true The whole chain was iterated over. |
---|
40 | * @retval false The iterator returned false. |
---|
41 | */ |
---|
42 | bool |
---|
43 | rtems_rtl_chain_iterate (rtems_chain_control* chain, |
---|
44 | rtems_chain_iterator iterator, |
---|
45 | void* data); |
---|
46 | |
---|
47 | /** |
---|
48 | * Count the number of nodes on the chain. |
---|
49 | * |
---|
50 | * @param chain The chain to count the nodes of. |
---|
51 | * @return int The number of nodes. |
---|
52 | */ |
---|
53 | int rtems_rtl_chain_count (rtems_chain_control* chain); |
---|
54 | |
---|
55 | #ifdef __cplusplus |
---|
56 | } |
---|
57 | #endif /* __cplusplus */ |
---|
58 | |
---|
59 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.