Changeset d6da1b1 in rtems


Ignore:
Timestamp:
Mar 14, 2014, 12:55:00 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
27d240e0
Parents:
bc75887
git-author:
Sebastian Huber <sebastian.huber@…> (03/14/14 12:55:00)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/17/14 08:17:37)
Message:

score: Use only next field for chain on/off

It is sufficient to use one field for the chain on/off indication. The
chain API functions are highly performance critical.

File:
1 edited

Legend:

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

    rbc75887 rd6da1b1  
    222222 * @brief Set off chain.
    223223 *
    224  * This function sets the next and previous fields of the @a node to NULL
    225  * indicating the @a node is not part of a chain.
     224 * This function sets the next field of the @a node to NULL indicating the @a
     225 * node is not part of a chain.
    226226 *
    227227 * @param[in] node the node set to off chain.
     
    231231)
    232232{
    233   node->next = node->previous = NULL;
     233  node->next = NULL;
    234234}
    235235
     
    237237 * @brief Is the node off chain.
    238238 *
    239  * This function returns true if the @a node is not on a chain. A @a node is
    240  * off chain if the next and previous fields are set to NULL.
     239 * This function returns true if the @a node is not on a chain.  A @a node is
     240 * off chain if the next field is set to NULL.
    241241 *
    242242 * @param[in] node is the node off chain.
     
    249249)
    250250{
    251   return (node->next == NULL) && (node->previous == NULL);
     251  return node->next == NULL;
    252252}
    253253
Note: See TracChangeset for help on using the changeset viewer.