RTEMS Logo

RTEMS 4.9.2 On-Line Library


Chains Controls

PREV UP NEXT Bookshelf RTEMS C User's Guide

28.2.2: Controls

A chain is anchored with a control object. Chain control provide the user with access to the nodes on the chain. The control is head of the node.

       Control
        next ------------------------->
        permanent_null <--------------- NODE
        last ------------------------->

The implementation does not require special checks for manipulating the first and last nodes on the chain. To accomplish this the rtems_chain_control structure is treated as two overlapping rtems_chain_node structures. The permanent head of the chain overlays a node structure on the first and permanent_null fields. The permanent_tail of the chain overlays a node structure on the permanent_null and last elements of the structure.


PREV UP NEXT Bookshelf RTEMS C User's Guide

Copyright © 1988-2008 OAR Corporation