RTEMS CPU Kit with SuperCore  4.11.2
Macros | Typedefs | Functions
chainimpl.h File Reference

Chain Handler API. More...

#include <rtems/score/chain.h>
#include <rtems/score/address.h>
#include <rtems/score/assert.h>
Include dependency graph for chainimpl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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. More...
 
#define CHAIN_NODE_INITIALIZER_ONE_NODE_CHAIN(chain)   { &(chain)->Tail.Node, &(chain)->Head.Node }
 Chain node initializer for a chain containing exactly this node. More...
 
#define CHAIN_DEFINE_EMPTY(name)   Chain_Control name = CHAIN_INITIALIZER_EMPTY(name)
 Chain definition for an empty chain with designator name.
 

Typedefs

typedef bool(* Chain_Node_order) (const Chain_Node *left, const Chain_Node *right)
 Chain node order. More...
 

Functions

void _Chain_Initialize (Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size)
 Initialize a chain header. More...
 
void _Chain_Extract (Chain_Node *the_node)
 Extract the specified node from a chain. More...
 
Chain_Node_Chain_Get (Chain_Control *the_chain)
 Obtain the first node on a chain. More...
 
void _Chain_Insert (Chain_Node *after_node, Chain_Node *the_node)
 Insert a node on a chain. More...
 
void _Chain_Append (Chain_Control *the_chain, Chain_Node *the_node)
 Append a node on the end of a chain. More...
 
bool _Chain_Append_with_empty_check (Chain_Control *the_chain, Chain_Node *the_node)
 Append a node and check if the chain was empty before. More...
 
bool _Chain_Prepend_with_empty_check (Chain_Control *the_chain, Chain_Node *the_node)
 Prepend a node and check if the chain was empty before. More...
 
bool _Chain_Get_with_empty_check (Chain_Control *the_chain, Chain_Node **the_node)
 Get the first node and check if the chain is empty afterwards. More...
 
size_t _Chain_Node_count_unprotected (const Chain_Control *chain)
 Returns the node count of the chain. More...
 
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain (Chain_Node *node)
 Set off chain. More...
 
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain (const Chain_Node *node)
 Is the node off chain. More...
 
RTEMS_INLINE_ROUTINE bool _Chain_Are_nodes_equal (const Chain_Node *left, const Chain_Node *right)
 Are two nodes equal. More...
 
RTEMS_INLINE_ROUTINE bool _Chain_Is_null_node (const Chain_Node *the_node)
 Is the chain node pointer NULL. More...
 
RTEMS_INLINE_ROUTINE Chain_Node_Chain_Head (Chain_Control *the_chain)
 Return pointer to chain head. More...
 
RTEMS_INLINE_ROUTINE const Chain_Node_Chain_Immutable_head (const Chain_Control *the_chain)
 Return pointer to immutable chain head. More...
 
RTEMS_INLINE_ROUTINE Chain_Node_Chain_Tail (Chain_Control *the_chain)
 Return pointer to chain tail. More...
 
RTEMS_INLINE_ROUTINE const Chain_Node_Chain_Immutable_tail (const Chain_Control *the_chain)
 Return pointer to immutable chain tail. More...
 
RTEMS_INLINE_ROUTINE Chain_Node_Chain_First (Chain_Control *the_chain)
 Return pointer to chain's first node. More...
 
RTEMS_INLINE_ROUTINE const Chain_Node_Chain_Immutable_first (const Chain_Control *the_chain)
 Return pointer to immutable chain's first node. More...
 
RTEMS_INLINE_ROUTINE Chain_Node_Chain_Last (Chain_Control *the_chain)
 Return pointer to chain's last node. More...
 
RTEMS_INLINE_ROUTINE const Chain_Node_Chain_Immutable_last (const Chain_Control *the_chain)
 Return pointer to immutable chain's last node. More...
 
RTEMS_INLINE_ROUTINE Chain_Node_Chain_Next (Chain_Node *the_node)
 Return pointer the next node from this node. More...
 
RTEMS_INLINE_ROUTINE const Chain_Node_Chain_Immutable_next (const Chain_Node *the_node)
 Return pointer the immutable next node from this node. More...
 
RTEMS_INLINE_ROUTINE Chain_Node_Chain_Previous (Chain_Node *the_node)
 Return pointer the previous node from this node. More...
 
RTEMS_INLINE_ROUTINE const Chain_Node_Chain_Immutable_previous (const Chain_Node *the_node)
 Return pointer the immutable previous node from this node. More...
 
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty (const Chain_Control *the_chain)
 Is the chain empty. More...
 
RTEMS_INLINE_ROUTINE bool _Chain_Is_first (const Chain_Node *the_node)
 Is this the first node on the chain. More...
 
RTEMS_INLINE_ROUTINE bool _Chain_Is_last (const Chain_Node *the_node)
 Is this the last node on the chain. More...
 
RTEMS_INLINE_ROUTINE bool _Chain_Has_only_one_node (const Chain_Control *the_chain)
 Does this chain have only one node. More...
 
RTEMS_INLINE_ROUTINE bool _Chain_Is_head (const Chain_Control *the_chain, const Chain_Node *the_node)
 Is this node the chain head. More...
 
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail (const Chain_Control *the_chain, const Chain_Node *the_node)
 Is this node the chail tail. More...
 
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty (Chain_Control *the_chain)
 Initialize this chain as empty. More...
 
RTEMS_INLINE_ROUTINE void _Chain_Extract_unprotected (Chain_Node *the_node)
 Extract this node (unprotected). More...
 
RTEMS_INLINE_ROUTINE Chain_Node_Chain_Get_first_unprotected (Chain_Control *the_chain)
 Get the first node (unprotected). More...
 
RTEMS_INLINE_ROUTINE Chain_Node_Chain_Get_unprotected (Chain_Control *the_chain)
 Get the first node (unprotected). More...
 
RTEMS_INLINE_ROUTINE void _Chain_Insert_unprotected (Chain_Node *after_node, Chain_Node *the_node)
 Insert a node (unprotected). More...
 
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected (Chain_Control *the_chain, Chain_Node *the_node)
 Append a node (unprotected). More...
 
RTEMS_INLINE_ROUTINE void _Chain_Append_if_is_off_chain_unprotected (Chain_Control *the_chain, Chain_Node *the_node)
 Append a node on the end of a chain if the node is in the off chain state (unprotected). More...
 
RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected (Chain_Control *the_chain, Chain_Node *the_node)
 Prepend a node (unprotected). More...
 
RTEMS_INLINE_ROUTINE void _Chain_Prepend (Chain_Control *the_chain, Chain_Node *the_node)
 Prepend a node (protected). More...
 
RTEMS_INLINE_ROUTINE bool _Chain_Append_with_empty_check_unprotected (Chain_Control *the_chain, Chain_Node *the_node)
 Append a node and check if the chain was empty before (unprotected). More...
 
RTEMS_INLINE_ROUTINE bool _Chain_Prepend_with_empty_check_unprotected (Chain_Control *the_chain, Chain_Node *the_node)
 Prepend a node and check if the chain was empty before (unprotected). More...
 
RTEMS_INLINE_ROUTINE bool _Chain_Get_with_empty_check_unprotected (Chain_Control *the_chain, Chain_Node **the_node)
 Get the first node and check if the chain is empty afterwards (unprotected). More...
 
RTEMS_INLINE_ROUTINE void _Chain_Insert_ordered_unprotected (Chain_Control *chain, Chain_Node *to_insert, Chain_Node_order order)
 Inserts a node into the chain according to the order relation. More...
 

Detailed Description

Chain Handler API.