RTEMS: cpukit/include/rtems/chain.h File Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Macros | Typedefs | Functions
chain.h File Reference

Chain API. More...

`#include <rtems/score/chainimpl.h>`
`#include <rtems/rtems/event.h>`

Go to the source code of this file.

## Macros
#define | RTEMS_CHAIN_INITIALIZER_EMPTY(name) CHAIN_INITIALIZER_EMPTY( name )
| Chain initializer for an empty chain with designator name.
#define | RTEMS_CHAIN_INITIALIZER_ONE_NODE(node) CHAIN_INITIALIZER_ONE_NODE( node )
| Chain initializer for a chain with one node.
#define | RTEMS_CHAIN_NODE_INITIALIZER_ONE_NODE_CHAIN(chain) CHAIN_NODE_INITIALIZER_ONE_NODE_CHAIN( chain )
| Chain node initializer for a chain containing exactly this node.
#define | RTEMS_CHAIN_DEFINE_EMPTY(name) rtems_chain_control name = RTEMS_CHAIN_INITIALIZER_EMPTY( name )
| Chain definition for an empty chain with designator name.

## Typedefs
typedef Chain_Node | rtems_chain_node
typedef Chain_Control | rtems_chain_control

## Functions
rtems_status_code | rtems_chain_append_with_notification (rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events)
| Appends the node to the chain and sends the events to the task if the chain was empty before the append.
rtems_status_code | rtems_chain_prepend_with_notification (rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events)
| Prepends the node to the chain and sends the events to the task if the chain was empty before the prepend.
rtems_status_code | rtems_chain_get_with_notification (rtems_chain_control *chain, rtems_id task, rtems_event_set events, rtems_chain_node **node)
| Gets the first node of the chain and sends the events to the task if the chain is empty after the get.
rtems_status_code | rtems_chain_get_with_wait (rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node)
| Gets the first node of the chain and sends the events to the task if the chain is empty afterwards.
RTEMS_INLINE_ROUTINE void | rtems_chain_initialize (rtems_chain_control *the_chain, void *starting_address, size_t number_nodes, size_t node_size)
| Initialize a chain Header.
RTEMS_INLINE_ROUTINE void | rtems_chain_initialize_empty (rtems_chain_control *the_chain)
| Initialize this chain as empty.
RTEMS_INLINE_ROUTINE void | rtems_chain_set_off_chain (rtems_chain_node *node)
| Set off chain.
RTEMS_INLINE_ROUTINE void | rtems_chain_initialize_node (rtems_chain_node *node)
| Initializes a chain node.
RTEMS_INLINE_ROUTINE bool | rtems_chain_is_node_off_chain (const rtems_chain_node *node)
| Is the node off chain.
RTEMS_INLINE_ROUTINE bool | rtems_chain_is_null_node (const rtems_chain_node *the_node)
| Is the chain node pointer NULL.
RTEMS_INLINE_ROUTINE rtems_chain_node * | rtems_chain_head (rtems_chain_control *the_chain)
| Return pointer to Chain Head.
RTEMS_INLINE_ROUTINE const rtems_chain_node * | rtems_chain_immutable_head (const rtems_chain_control *the_chain)
| Return pointer to immutable Chain Head.
RTEMS_INLINE_ROUTINE rtems_chain_node * | rtems_chain_tail (rtems_chain_control *the_chain)
| Return pointer to Chain Tail.
RTEMS_INLINE_ROUTINE const rtems_chain_node * | rtems_chain_immutable_tail (const rtems_chain_control *the_chain)
| Return pointer to immutable Chain Tail.
RTEMS_INLINE_ROUTINE rtems_chain_node * | rtems_chain_first (const rtems_chain_control *the_chain)
| Return pointer to Chain's First node after the permanent head.
RTEMS_INLINE_ROUTINE const rtems_chain_node * | rtems_chain_immutable_first (const rtems_chain_control *the_chain)
| Return pointer to immutable Chain's First node.
RTEMS_INLINE_ROUTINE rtems_chain_node * | rtems_chain_last (const rtems_chain_control *the_chain)
| Return pointer to Chain's Last node before the permanent tail.
RTEMS_INLINE_ROUTINE const rtems_chain_node * | rtems_chain_immutable_last (const rtems_chain_control *the_chain)
| Return pointer to immutable Chain's Last node.
RTEMS_INLINE_ROUTINE rtems_chain_node * | rtems_chain_next (const rtems_chain_node *the_node)
| Return pointer the next node from this node.
RTEMS_INLINE_ROUTINE const rtems_chain_node * | rtems_chain_immutable_next (const rtems_chain_node *the_node)
| Return pointer the immutable next node from this node.
RTEMS_INLINE_ROUTINE rtems_chain_node * | rtems_chain_previous (const rtems_chain_node *the_node)
| Return pointer the previous node from this node.
RTEMS_INLINE_ROUTINE const rtems_chain_node * | rtems_chain_immutable_previous (const rtems_chain_node *the_node)
| Return pointer the immutable previous node from this node.
RTEMS_INLINE_ROUTINE bool | rtems_chain_are_nodes_equal (const rtems_chain_node *left, const rtems_chain_node *right)
| Are Two nodes equal.
RTEMS_INLINE_ROUTINE bool | rtems_chain_is_empty (const rtems_chain_control *the_chain)
| Is the chain empty.
RTEMS_INLINE_ROUTINE bool | rtems_chain_is_first (const rtems_chain_node *the_node)
| Is this the first node on the chain.
RTEMS_INLINE_ROUTINE bool | rtems_chain_is_last (const rtems_chain_node *the_node)
| Is this the last node on the chain.
RTEMS_INLINE_ROUTINE bool | rtems_chain_has_only_one_node (const rtems_chain_control *the_chain)
| Does this chain have only one node.
RTEMS_INLINE_ROUTINE bool | rtems_chain_is_head (const rtems_chain_control *the_chain, const rtems_chain_node *the_node)
| Is this node the chain head.
RTEMS_INLINE_ROUTINE bool | rtems_chain_is_tail (const rtems_chain_control *the_chain, const rtems_chain_node *the_node)
| Is this node the chain tail.
void | rtems_chain_extract (rtems_chain_node *the_node)
| Extract the specified node from a chain.
RTEMS_INLINE_ROUTINE void | rtems_chain_extract_unprotected (rtems_chain_node *the_node)
| Extract the specified node from a chain (unprotected).
rtems_chain_node * | rtems_chain_get (rtems_chain_control *the_chain)
| Obtain the first node on a chain.
RTEMS_INLINE_ROUTINE rtems_chain_node * | rtems_chain_get_unprotected (rtems_chain_control *the_chain)
| See _Chain_Get_unprotected().
RTEMS_INLINE_ROUTINE rtems_chain_node * | rtems_chain_get_first_unprotected (rtems_chain_control *the_chain)
| See _Chain_Get_first_unprotected().
void | rtems_chain_insert (rtems_chain_node *after_node, rtems_chain_node *the_node)
| Insert a node on a chain.
RTEMS_INLINE_ROUTINE void | rtems_chain_insert_unprotected (rtems_chain_node *after_node, rtems_chain_node *the_node)
| See _Chain_Insert_unprotected().
void | rtems_chain_append (rtems_chain_control *the_chain, rtems_chain_node *the_node)
| Append a node on the end of a chain.
RTEMS_INLINE_ROUTINE void | rtems_chain_append_unprotected (rtems_chain_control *the_chain, rtems_chain_node *the_node)
| Append a node on the end of a chain (unprotected).
void | rtems_chain_prepend (rtems_chain_control *the_chain, rtems_chain_node *the_node)
| Prepend a node.
RTEMS_INLINE_ROUTINE void | rtems_chain_prepend_unprotected (rtems_chain_control *the_chain, rtems_chain_node *the_node)
| Prepend a node (unprotected).
bool | rtems_chain_append_with_empty_check (rtems_chain_control *chain, rtems_chain_node *node)
| Checks if the chain is empty and appends the node.
bool | rtems_chain_prepend_with_empty_check (rtems_chain_control *chain, rtems_chain_node *node)
| Checks if the chain is empty and prepends the node.
bool | rtems_chain_get_with_empty_check (rtems_chain_control *chain, rtems_chain_node **node)
| Tries to get the first node and check if the chain is empty afterwards.
RTEMS_INLINE_ROUTINE size_t | rtems_chain_node_count_unprotected (const rtems_chain_control *chain)
| Returns the node count of the chain.

## Detailed Description

Chain API.