diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-14 13:55:00 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-17 09:17:37 +0100 |
commit | d6da1b1ef4bf83faa6cc15d3ca7bf0c8b8e80508 (patch) | |
tree | 384158c3d26932a7e693c2d8f95880957cc3fc31 /cpukit/score/include/rtems/score/chainimpl.h | |
parent | tests/fstests: Use <rtems/test.h> (diff) | |
download | rtems-d6da1b1ef4bf83faa6cc15d3ca7bf0c8b8e80508.tar.bz2 |
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.
Diffstat (limited to 'cpukit/score/include/rtems/score/chainimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/chainimpl.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cpukit/score/include/rtems/score/chainimpl.h b/cpukit/score/include/rtems/score/chainimpl.h index 98416b25e7..1a7ee5dbb4 100644 --- a/cpukit/score/include/rtems/score/chainimpl.h +++ b/cpukit/score/include/rtems/score/chainimpl.h @@ -221,8 +221,8 @@ size_t _Chain_Node_count_unprotected( const Chain_Control *chain ); /** * @brief Set off chain. * - * This function sets the next and previous fields of the @a node to NULL - * indicating the @a node is not part of a chain. + * This function sets the next field of the @a node to NULL indicating the @a + * node is not part of a chain. * * @param[in] node the node set to off chain. */ @@ -230,14 +230,14 @@ RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain( Chain_Node *node ) { - node->next = node->previous = NULL; + node->next = NULL; } /** * @brief Is the node off chain. * - * This function returns true if the @a node is not on a chain. A @a node is - * off chain if the next and previous fields are set to NULL. + * This function returns true if the @a node is not on a chain. A @a node is + * off chain if the next field is set to NULL. * * @param[in] node is the node off chain. * @@ -248,7 +248,7 @@ RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain( const Chain_Node *node ) { - return (node->next == NULL) && (node->previous == NULL); + return node->next == NULL; } /** |