Ignore:
Timestamp:
Aug 10, 2016, 6:21:54 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
cac586e
Parents:
da15db78
git-author:
Sebastian Huber <sebastian.huber@…> (08/10/16 06:21:54)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/06/16 08:52:20)
Message:

score: Add _Chain_Initialize_one()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/include/rtems/score/chainimpl.h

    rda15db78 r3709987  
    518518  head->previous = NULL;
    519519  tail->previous = head;
     520}
     521
     522/**
     523 * @brief Initializes this chain to contain exactly the specified node.
     524 *
     525 * @param[in] the_chain The chain control.
     526 * @param[in] the_node The one and only node.
     527 */
     528RTEMS_INLINE_ROUTINE void _Chain_Initialize_one(
     529  Chain_Control *the_chain,
     530  Chain_Node    *the_node
     531)
     532{
     533  Chain_Node *head;
     534  Chain_Node *tail;
     535
     536  _Assert( _Chain_Is_node_off_chain( the_node ) );
     537
     538  head = _Chain_Head( the_chain );
     539  tail = _Chain_Tail( the_chain );
     540
     541  the_node->next = tail;
     542  the_node->previous = head;
     543
     544  head->next = the_node;
     545  head->previous = NULL;
     546  tail->previous = the_node;
    520547}
    521548
Note: See TracChangeset for help on using the changeset viewer.