![]() |
RTEMS 6.3
|
This group contains the Chain Handler implementation. More...
Files | |
| file | cpukit/include/rtems/score/chain.h |
| This header file provides interfaces of the Chain Handler which are used by the implementation and the API. | |
| file | cpukit/include/rtems/score/chainimpl.h |
| This header file provides interfaces of the Chain Handler which are only used by the implementation. | |
| file | cpukit/score/src/chain.c |
| This source file contains the implementation of _Chain_Initialize(). | |
| file | cpukit/score/src/chainnodecount.c |
| This source file contains the implementation of _Chain_Node_count_unprotected(). | |
Data Structures | |
| struct | Chain_Node |
| This structure represents a chain node. More... | |
| union | Chain_Control |
| This union represents a chain control block. More... | |
| struct | Chain_Control::[struct].Head |
| struct | Chain_Control::[struct].Tail |
| struct | Chain_Iterator |
| A chain iterator which is updated during node extraction if it is properly registered. More... | |
| struct | Chain_Iterator_registry |
| A registry for chain iterators. More... | |
Macros | |
| #define | CHAIN_INITIALIZER_EMPTY(name) |
| Chain initializer for an empty chain with designator name. | |
| #define | CHAIN_INITIALIZER_ONE_NODE(node) |
| Chain initializer for a chain with one node. | |
| #define | CHAIN_NODE_INITIALIZER_ONE_NODE_CHAIN(chain) |
| Chain node initializer for a chain containing exactly this node. | |
| #define | CHAIN_DEFINE_EMPTY(name) |
| Chain definition for an empty chain with designator name. | |
| #define | CHAIN_ITERATOR_REGISTRY_INITIALIZER(name) |
| Chain iterator registry initializer for static initialization. | |
Typedefs | |
| typedef struct Chain_Node | Chain_Node |
| This structure represents a chain node. | |
| typedef bool(*) | Chain_Node_order(const void *key, const Chain_Node *left, const Chain_Node *right) |
| Chain node order. | |
Enumerations | |
| enum | Chain_Iterator_direction { CHAIN_ITERATOR_FORWARD , CHAIN_ITERATOR_BACKWARD } |
| The chain iterator direction. More... | |
Functions | |
| void | _Chain_Initialize (Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size) |
| Initializes a chain header. | |
| size_t | _Chain_Node_count_unprotected (const Chain_Control *chain) |
| Returns the node count of the chain. | |
This group contains the Chain Handler implementation.
The Chain Handler is used to manage sets of entities. This handler provides two data structures. The Chain Node data structure is included as the first part of every data structure that will be placed on a chain. The second data structure is Chain Control which is used to manage a set of Chain Nodes.
| #define CHAIN_DEFINE_EMPTY | ( | name | ) |
Chain definition for an empty chain with designator name.
| #define CHAIN_INITIALIZER_EMPTY | ( | name | ) |
Chain initializer for an empty chain with designator name.
| #define CHAIN_INITIALIZER_ONE_NODE | ( | node | ) |
Chain initializer for a chain with one node.
| #define CHAIN_ITERATOR_REGISTRY_INITIALIZER | ( | name | ) |
Chain iterator registry initializer for static initialization.
| name | The designator of the chain iterator registry. |
| #define CHAIN_NODE_INITIALIZER_ONE_NODE_CHAIN | ( | chain | ) |
Chain node initializer for a chain containing exactly this node.
| typedef struct Chain_Node Chain_Node |
This structure represents a chain node.
This is used to manage each element (node) which is placed on a chain.
| typedef bool(*) Chain_Node_order(const void *key, const Chain_Node *left, const Chain_Node *right) |
Chain node order.
| left | The left hand side. |
| right | The right hand side. |
| true | According to the order the left node precedes the right node. |
| false | Otherwise. |
| void _Chain_Initialize | ( | Chain_Control * | the_chain, |
| void * | starting_address, | ||
| size_t | number_nodes, | ||
| size_t | node_size ) |
Initializes a chain header.
This routine initializes the_chain structure to manage the contiguous array of number_nodes nodes which starts at starting_address. Each node is of node_size bytes.
| [out] | the_chain | Specifies the chain to initialize. |
| starting_address | The starting address of the array of elements. | |
| number_nodes | The number of nodes that will be in the chain. | |
| node_size | The size of each node. |
| size_t _Chain_Node_count_unprotected | ( | const Chain_Control * | chain | ) |
Returns the node count of the chain.
| chain | The chain to return the node count from. |