RTEMS
5.0.0
|
Files | |
file | chain.h |
Chain Handler API. | |
file | chain.c |
Initialize a Chain Header. | |
Data Structures | |
struct | Chain_Node_struct |
struct | Chain_Control |
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. 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. | |
#define | CHAIN_ITERATOR_REGISTRY_INITIALIZER(name) { CHAIN_INITIALIZER_EMPTY( name.Iterators ) } |
Chain iterator registry initializer for static initialization. More... | |
Typedefs | |
typedef struct Chain_Node_struct | Chain_Node |
typedef bool(* | Chain_Node_order) (const void *left, const Chain_Node *right) |
Chain node order. More... | |
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) |
Initialize a chain header. 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 void | _Chain_Initialize_node (Chain_Node *the_node) |
Initializes a chain node. 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 (const 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 (const 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 (const 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 (const 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_Initialize_one (Chain_Control *the_chain, Chain_Node *the_node) |
Initializes this chain to contain exactly the specified node. 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 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 *the_chain, Chain_Node *to_insert, const void *left, Chain_Node_order order) |
Inserts a node into the chain according to the order relation. More... | |
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. More... | |
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. More... | |
RTEMS_INLINE_ROUTINE Chain_Node * | _Chain_Iterator_next (const Chain_Iterator *the_iterator) |
Returns the next node in the iterator direction. More... | |
RTEMS_INLINE_ROUTINE void | _Chain_Iterator_set_position (Chain_Iterator *the_iterator, Chain_Node *the_node) |
Sets the iterator position. More... | |
RTEMS_INLINE_ROUTINE void | _Chain_Iterator_destroy (Chain_Iterator *the_iterator) |
Destroys the iterator. More... | |
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_INITIALIZER_ONE_NODE | ( | node | ) | { { { (node), NULL }, (node) } } |
Chain initializer for a chain with one node.
#define CHAIN_ITERATOR_REGISTRY_INITIALIZER | ( | name | ) | { CHAIN_INITIALIZER_EMPTY( name.Iterators ) } |
Chain iterator registry initializer for static initialization.
name | The designator of the chain iterator registry. |
#define CHAIN_NODE_INITIALIZER_ONE_NODE_CHAIN | ( | chain | ) | { &(chain)->Tail.Node, &(chain)->Head.Node } |
Chain node initializer for a chain containing exactly this node.
This type definition promotes the name for the Chain Node used by all RTEMS code. It is a separate type definition because a forward reference is required to define it. See Chain_Node_struct for detailed information.
typedef bool( * Chain_Node_order) (const void *left, const Chain_Node *right) |
Chain node order.
[in] | left | The left hand side. |
[in] | right | The right hand side. |
true | According to the order the left node precedes the right node. |
false | Otherwise. |
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).
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected | ( | Chain_Control * | the_chain, |
Chain_Node * | the_node | ||
) |
Append a node (unprotected).
This routine appends the_node onto the end of the_chain.
[in] | the_chain | is the chain to be operated upon. |
[in] | the_node | is the node to be appended. |
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).
This routine appends the_node onto the end of the_chain.
[in] | the_chain | is the chain to be operated upon. |
[in] | the_node | is the node to be appended. |
true | The chain was empty before. |
false | The chain contained at least one node before. |
RTEMS_INLINE_ROUTINE bool _Chain_Are_nodes_equal | ( | const Chain_Node * | left, |
const Chain_Node * | right | ||
) |
Are two nodes equal.
This function returns true if left and right are equal, and false otherwise.
[in] | left | is the node on the left hand side of the comparison. |
[in] | right | is the node on the left hand side of the comparison. |
true | left and right are equal. |
false | left and right are not equal. |
RTEMS_INLINE_ROUTINE void _Chain_Extract_unprotected | ( | Chain_Node * | the_node | ) |
Extract this node (unprotected).
This routine extracts the_node from the chain on which it resides. It does NOT disable interrupts to ensure the atomicity of the extract operation.
[in] | the_node | is the node to be extracted. |
RTEMS_INLINE_ROUTINE Chain_Node* _Chain_First | ( | const Chain_Control * | the_chain | ) |
Return pointer to chain's first node.
This function returns a pointer to the first node on the chain after the head.
[in] | the_chain | is the chain to be operated upon. |
RTEMS_INLINE_ROUTINE Chain_Node* _Chain_Get_first_unprotected | ( | Chain_Control * | the_chain | ) |
Get the first node (unprotected).
This function removes the first node from the_chain and returns a pointer to that node. It does NOT disable interrupts to ensure the atomicity of the get operation.
[in] | the_chain | is the chain to attempt to get the first node from. |
RTEMS_INLINE_ROUTINE Chain_Node* _Chain_Get_unprotected | ( | Chain_Control * | the_chain | ) |
Get the first node (unprotected).
This function removes the first node from the_chain and returns a pointer to that node. If the_chain is empty, then NULL is returned.
[in] | the_chain | is the chain to attempt to get the first node from. |
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).
This function removes the first node from the_chain and returns a pointer to that node in the_node. If the_chain is empty, then NULL is returned.
[in] | the_chain | is the chain to attempt to get the first node from. |
[out] | the_node | is the first node on the chain or NULL if the chain is empty. |
true | The chain is empty now. |
false | The chain contains at least one node now. |
RTEMS_INLINE_ROUTINE bool _Chain_Has_only_one_node | ( | const Chain_Control * | the_chain | ) |
Does this chain have only one node.
This function returns true if there is only one node on the_chain and false otherwise.
[in] | the_chain | is the chain to be operated upon. |
true | There is only one node on the_chain. |
false | There is more than one node on the_chain. |
RTEMS_INLINE_ROUTINE Chain_Node* _Chain_Head | ( | Chain_Control * | the_chain | ) |
Return pointer to chain head.
This function returns a pointer to the head node on the chain.
[in] | the_chain | is the chain to be operated upon. |
RTEMS_INLINE_ROUTINE const Chain_Node* _Chain_Immutable_first | ( | const Chain_Control * | the_chain | ) |
Return pointer to immutable chain's first node.
This function returns a pointer to the first node on the chain after the head.
[in] | the_chain | is the chain to be operated upon. |
RTEMS_INLINE_ROUTINE const Chain_Node* _Chain_Immutable_head | ( | const Chain_Control * | the_chain | ) |
Return pointer to immutable chain head.
This function returns a pointer to the head node on the chain.
[in] | the_chain | is the chain to be operated upon. |
RTEMS_INLINE_ROUTINE const Chain_Node* _Chain_Immutable_last | ( | const Chain_Control * | the_chain | ) |
Return pointer to immutable chain's last node.
This function returns a pointer to the last node on the chain just before the tail.
[in] | the_chain | is the chain to be operated upon. |
RTEMS_INLINE_ROUTINE const Chain_Node* _Chain_Immutable_next | ( | const Chain_Node * | the_node | ) |
Return pointer the immutable next node from this node.
This function returns a pointer to the next node after this node.
[in] | the_node | is the node to be operated upon. |
RTEMS_INLINE_ROUTINE const Chain_Node* _Chain_Immutable_previous | ( | const Chain_Node * | the_node | ) |
Return pointer the immutable previous node from this node.
This function returns a pointer to the previous node on this chain.
[in] | the_node | is the node to be operated upon. |
RTEMS_INLINE_ROUTINE const Chain_Node* _Chain_Immutable_tail | ( | const Chain_Control * | the_chain | ) |
Return pointer to immutable chain tail.
This function returns a pointer to the tail node on the chain.
[in] | the_chain | is the chain to be operated upon. |
void _Chain_Initialize | ( | Chain_Control * | the_chain, |
void * | starting_address, | ||
size_t | number_nodes, | ||
size_t | node_size | ||
) |
Initialize 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.
[in] | the_chain | specifies the chain to initialize |
[in] | starting_address | is the starting address of the array of elements |
[in] | number_nodes | is the numebr of nodes that will be in the chain |
[in] | node_size | is the size of each node |
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty | ( | Chain_Control * | the_chain | ) |
Initialize this chain as empty.
This routine initializes the specified chain to contain zero nodes.
[in] | the_chain | is the chain to be initialized. |
RTEMS_INLINE_ROUTINE void _Chain_Initialize_node | ( | Chain_Node * | the_node | ) |
Initializes a chain node.
In debug configurations, the node is set off chain. In all other configurations, this function does nothing.
[in] | the_node | The chain node to initialize. |
RTEMS_INLINE_ROUTINE void _Chain_Initialize_one | ( | Chain_Control * | the_chain, |
Chain_Node * | the_node | ||
) |
Initializes this chain to contain exactly the specified node.
[in] | the_chain | The chain control. |
[in] | the_node | The one and only node. |
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.
After the operation the chain contains the node to insert and the order relation holds for all nodes from the head up to the inserted node. Nodes after the inserted node are not moved.
[in] | the_chain | The chain. |
[in] | to_insert | The node to insert. |
[in] | left | The left hand side passed to the order relation. It must correspond to the node to insert. The separate left hand side parameter may help the compiler to generate better code if it is stored in a local variable. |
[in] | order | The order relation. |
RTEMS_INLINE_ROUTINE void _Chain_Insert_unprotected | ( | Chain_Node * | after_node, |
Chain_Node * | the_node | ||
) |
Insert a node (unprotected).
This routine inserts the_node on a chain immediately following after_node.
[in] | after_node | is the node which will precede the_node on the chain. |
[in] | the_node | is the node to be inserted. |
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty | ( | const Chain_Control * | the_chain | ) |
Is the chain empty.
This function returns true if there a no nodes on the_chain and false otherwise.
[in] | the_chain | is the chain to be operated upon. |
true | There are no nodes on the_chain. |
false | There are nodes on the_chain. |
RTEMS_INLINE_ROUTINE bool _Chain_Is_first | ( | const Chain_Node * | the_node | ) |
Is this the first node on the chain.
This function returns true if the_node is the first node on a chain and false otherwise.
[in] | the_node | is the node the caller wants to know if it is the first node on a chain. |
true | the_node is the first node on a chain. |
false | the_node is not the first node on a chain. |
RTEMS_INLINE_ROUTINE bool _Chain_Is_head | ( | const Chain_Control * | the_chain, |
const Chain_Node * | the_node | ||
) |
Is this node the chain head.
This function returns true if the_node is the head of the_chain and false otherwise.
[in] | the_chain | is the chain to be operated upon. |
[in] | the_node | is the node to check for being the Chain Head. |
true | the_node is the head of the_chain. |
false | the_node is not the head of the_chain. |
RTEMS_INLINE_ROUTINE bool _Chain_Is_last | ( | const Chain_Node * | the_node | ) |
Is this the last node on the chain.
This function returns true if the_node is the last node on a chain and false otherwise.
[in] | the_node | is the node to check as the last node. |
true | the_node is the last node on a chain. |
false | the_node is not the last node on a chain. |
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain | ( | const Chain_Node * | node | ) |
Is the node off chain.
This function returns true if the node is not on a chain. A node is off chain if the next field is set to NULL.
[in] | node | is the node off chain. |
true | The node is off chain. |
false | The node is not off chain. |
RTEMS_INLINE_ROUTINE bool _Chain_Is_null_node | ( | const Chain_Node * | the_node | ) |
Is the chain node pointer NULL.
This function returns true if the_node is NULL and false otherwise.
[in] | the_node | is the node pointer to check. |
true | the_node is NULL . |
false | the_node is not NULL . |
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail | ( | const Chain_Control * | the_chain, |
const Chain_Node * | the_node | ||
) |
Is this node the chail tail.
This function returns true if the_node is the tail of the_chain and false otherwise.
[in] | the_chain | is the chain to be operated upon. |
[in] | the_node | is the node to check for being the Chain Tail. |
true | the_node is the tail of the_chain. |
false | the_node is not the tail of the_chain. |
RTEMS_INLINE_ROUTINE void _Chain_Iterator_destroy | ( | Chain_Iterator * | the_iterator | ) |
Destroys the iterator.
Removes the iterator from its registry.
the_iterator | The chain iterator. |
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.
In the following example nodes inserted during the iteration are visited in case they are inserted after the current position in iteration order.
the_chain | The chain to iterate. |
the_registry | The registry for the chain iterator. |
the_iterator | The chain iterator to initialize. |
direction | The iteration direction. |
RTEMS_INLINE_ROUTINE Chain_Node* _Chain_Iterator_next | ( | const Chain_Iterator * | the_iterator | ) |
Returns the next node in the iterator direction.
In case a next node exists, then the iterator should be updated via _Chain_Iterator_set_position() to continue with the next iteration step.
the_iterator | The chain iterator. |
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.
Must be called before _Chain_Extract_unprotected().
RTEMS_INLINE_ROUTINE void _Chain_Iterator_set_position | ( | Chain_Iterator * | the_iterator, |
Chain_Node * | the_node | ||
) |
Sets the iterator position.
the_iterator | The chain iterator. |
the_node | The new iterator position. |
RTEMS_INLINE_ROUTINE Chain_Node* _Chain_Last | ( | const Chain_Control * | the_chain | ) |
Return pointer to chain's last node.
This function returns a pointer to the last node on the chain just before the tail.
[in] | the_chain | is the chain to be operated upon. |
RTEMS_INLINE_ROUTINE Chain_Node* _Chain_Next | ( | const Chain_Node * | the_node | ) |
Return pointer the next node from this node.
This function returns a pointer to the next node after this node.
[in] | the_node | is the node to be operated upon. |
size_t _Chain_Node_count_unprotected | ( | const Chain_Control * | chain | ) |
Returns the node count of the chain.
[in] | chain | The chain. |
The | node count of the chain. |
RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected | ( | Chain_Control * | the_chain, |
Chain_Node * | the_node | ||
) |
Prepend a node (unprotected).
This routine prepends the_node onto the front of the_chain.
[in] | the_chain | is the chain to be operated upon. |
[in] | the_node | is the node to be prepended. |
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).
This routine prepends the_node onto the front of the_chain.
[in] | the_chain | is the chain to be operated upon. |
[in] | the_node | is the node to be prepended. |
true | The chain was empty before. |
false | The chain contained at least one node before. |
RTEMS_INLINE_ROUTINE Chain_Node* _Chain_Previous | ( | const Chain_Node * | the_node | ) |
Return pointer the previous node from this node.
This function returns a pointer to the previous node on this chain.
[in] | the_node | is the node to be operated upon. |
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain | ( | Chain_Node * | node | ) |
Set off chain.
This function sets the next field of the node to NULL indicating the node is not part of a chain.
[in] | node | the node set to off chain. |
RTEMS_INLINE_ROUTINE Chain_Node* _Chain_Tail | ( | Chain_Control * | the_chain | ) |
Return pointer to chain tail.
This function returns a pointer to the tail node on the chain.
[in] | the_chain | is the chain to be operated upon. |