RTEMS: cpukit/include/rtems/score/chainimpl.h File Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions
chainimpl.h File Reference
Internal » SuperCore » Chain Handler

Chain Handler API. More...

`#include <rtems/score/chain.h>`
`#include <rtems/score/assert.h>`

Go to the source code of this file.

## Data Structures
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) { { { &(name).Tail.Node, NULL }, &(name).Head.Node } }
| Chain initializer for an empty chain with designator name.
#define | CHAIN_INITIALIZER_ONE_NODE(node) { { { (node), NULL }, (node) } }
| Chain initializer for a chain with one node.
#define | CHAIN_NODE_INITIALIZER_ONE_NODE_CHAIN(chain) { &(chain)->Tail.Node, &(chain)->Head.Node }
| Chain node initializer for a chain containing exactly this node.
#define | CHAIN_DEFINE_EMPTY(name) Chain_Control name = CHAIN_INITIALIZER_EMPTY(name)
| Chain definition for an empty chain with designator name.
#define | CHAIN_ITERATOR_REGISTRY_INITIALIZER(name) { CHAIN_INITIALIZER_EMPTY( name.Iterators ) }
| Chain iterator registry initializer for static initialization.

## Typedefs
typedef bool(* | Chain_Node_order) (const void *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.
RTEMS_INLINE_ROUTINE void | _Chain_Set_off_chain (Chain_Node *node)
| Sets off chain.
RTEMS_INLINE_ROUTINE void | _Chain_Initialize_node (Chain_Node *the_node)
| Initializes a chain node.
RTEMS_INLINE_ROUTINE bool | _Chain_Is_node_off_chain (const Chain_Node *node)
| Checks if the node is off chain.
RTEMS_INLINE_ROUTINE bool | _Chain_Are_nodes_equal (const Chain_Node *left, const Chain_Node *right)
| Checks if two nodes are equal.
RTEMS_INLINE_ROUTINE bool | _Chain_Is_null_node (const Chain_Node *the_node)
| Checks if the chain node pointer is NULL.
RTEMS_INLINE_ROUTINE Chain_Node * | _Chain_Head (Chain_Control *the_chain)
| Returns pointer to chain head.
RTEMS_INLINE_ROUTINE const Chain_Node * | _Chain_Immutable_head (const Chain_Control *the_chain)
| Returns pointer to immutable chain head.
RTEMS_INLINE_ROUTINE Chain_Node * | _Chain_Tail (Chain_Control *the_chain)
| Returns pointer to chain tail.
RTEMS_INLINE_ROUTINE const Chain_Node * | _Chain_Immutable_tail (const Chain_Control *the_chain)
| Returns pointer to immutable chain tail.
RTEMS_INLINE_ROUTINE Chain_Node * | _Chain_First (const Chain_Control *the_chain)
| Returns pointer to chain's first node.
RTEMS_INLINE_ROUTINE const Chain_Node * | _Chain_Immutable_first (const Chain_Control *the_chain)
| Returns pointer to immutable chain's first node.
RTEMS_INLINE_ROUTINE Chain_Node * | _Chain_Last (const Chain_Control *the_chain)
| Returns pointer to chain's last node.
RTEMS_INLINE_ROUTINE const Chain_Node * | _Chain_Immutable_last (const Chain_Control *the_chain)
| Returns pointer to immutable chain's last node.
RTEMS_INLINE_ROUTINE Chain_Node * | _Chain_Next (const Chain_Node *the_node)
| Returns pointer to the next node from this node.
RTEMS_INLINE_ROUTINE const Chain_Node * | _Chain_Immutable_next (const Chain_Node *the_node)
| Returns pointer to the immutable next node from this node.
RTEMS_INLINE_ROUTINE Chain_Node * | _Chain_Previous (const Chain_Node *the_node)
| Returns pointer to the previous node from this node.
RTEMS_INLINE_ROUTINE const Chain_Node * | _Chain_Immutable_previous (const Chain_Node *the_node)
| Returns pointer to the immutable previous node from this node.
RTEMS_INLINE_ROUTINE bool | _Chain_Is_empty (const Chain_Control *the_chain)
| Checks if the chain is empty.
RTEMS_INLINE_ROUTINE bool | _Chain_Is_first (const Chain_Node *the_node)
| Checks if this is the first node on the chain.
RTEMS_INLINE_ROUTINE bool | _Chain_Is_last (const Chain_Node *the_node)
| Checks if this is the last node on the chain.
RTEMS_INLINE_ROUTINE bool | _Chain_Has_only_one_node (const Chain_Control *the_chain)
| Checks if this chain has only one node.
RTEMS_INLINE_ROUTINE bool | _Chain_Is_head (const Chain_Control *the_chain, const Chain_Node *the_node)
| Checks if this node is the chain head.
RTEMS_INLINE_ROUTINE bool | _Chain_Is_tail (const Chain_Control *the_chain, const Chain_Node *the_node)
| Checks if this node is the chain tail.
RTEMS_INLINE_ROUTINE void | _Chain_Initialize_empty (Chain_Control *the_chain)
| Initializes this chain as empty.
RTEMS_INLINE_ROUTINE void | _Chain_Initialize_one (Chain_Control *the_chain, Chain_Node *the_node)
| Initializes this chain to contain exactly the specified node.
RTEMS_INLINE_ROUTINE void | _Chain_Extract_unprotected (Chain_Node *the_node)
| Extracts this node (unprotected).
RTEMS_INLINE_ROUTINE Chain_Node * | _Chain_Get_first_unprotected (Chain_Control *the_chain)
| Gets the first node (unprotected).
RTEMS_INLINE_ROUTINE Chain_Node * | _Chain_Get_unprotected (Chain_Control *the_chain)
| Gets the first node (unprotected).
RTEMS_INLINE_ROUTINE void | _Chain_Insert_unprotected (Chain_Node *after_node, Chain_Node *the_node)
| Inserts a node (unprotected).
RTEMS_INLINE_ROUTINE void | _Chain_Append_unprotected (Chain_Control *the_chain, Chain_Node *the_node)
| Appends a node (unprotected).
RTEMS_INLINE_ROUTINE void | _Chain_Append_if_is_off_chain_unprotected (Chain_Control *the_chain, Chain_Node *the_node)
| Appends a node on the end of a chain if the node is in the off chain state (unprotected).
RTEMS_INLINE_ROUTINE void | _Chain_Prepend_unprotected (Chain_Control *the_chain, Chain_Node *the_node)
| Prepends a node (unprotected).
RTEMS_INLINE_ROUTINE bool | _Chain_Append_with_empty_check_unprotected (Chain_Control *the_chain, Chain_Node *the_node)
| Appends a node and checks if the chain was empty before (unprotected).
RTEMS_INLINE_ROUTINE bool | _Chain_Prepend_with_empty_check_unprotected (Chain_Control *the_chain, Chain_Node *the_node)
| Prepends a node and checks if the chain was empty before (unprotected).
RTEMS_INLINE_ROUTINE bool | _Chain_Get_with_empty_check_unprotected (Chain_Control *the_chain, Chain_Node **the_node)
| Gets the first node and checks if the chain is empty afterwards (unprotected).
RTEMS_INLINE_ROUTINE void | _Chain_Insert_ordered_unprotected (Chain_Control *the_chain, Chain_Node *to_insert, const void *left, Chain_Node_order order)
| Inserts a node into the chain according to the order relation.
RTEMS_INLINE_ROUTINE void | _Chain_Iterator_registry_initialize (Chain_Iterator_registry *the_registry)
| Initializes a chain iterator registry.
RTEMS_INLINE_ROUTINE void | _Chain_Iterator_registry_update (Chain_Iterator_registry *the_registry, Chain_Node *the_node_to_extract)
| Updates all iterators present in the chain iterator registry in case of a node extraction.
RTEMS_INLINE_ROUTINE void | _Chain_Iterator_initialize (Chain_Control *the_chain, Chain_Iterator_registry *the_registry, Chain_Iterator *the_iterator, Chain_Iterator_direction direction)
| Initializes the chain iterator.
RTEMS_INLINE_ROUTINE Chain_Node * | _Chain_Iterator_next (const Chain_Iterator *the_iterator)
| Returns the next node in the iterator direction.
RTEMS_INLINE_ROUTINE void | _Chain_Iterator_set_position (Chain_Iterator *the_iterator, Chain_Node *the_node)
| Sets the iterator position.
RTEMS_INLINE_ROUTINE void | _Chain_Iterator_destroy (Chain_Iterator *the_iterator)
| Destroys the iterator.

## Detailed Description

Chain Handler API.