diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-08-26 14:27:52 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-08-27 10:48:16 +0200 |
commit | 23de794d15f88845ee04f800387123856303c036 (patch) | |
tree | f570c3c996c002a7ef334f78430c805e03ed13c2 /cpukit/score/include/rtems/score/chainimpl.h | |
parent | bsps: Fix header includes (diff) | |
download | rtems-23de794d15f88845ee04f800387123856303c036.tar.bz2 |
score: Add and use CHAIN_INITIALIZER_ONE_NODE().
Add and use CHAIN_NODE_INITIALIZER_ONE_NODE_CHAIN(),
RTEMS_CHAIN_INITIALIZER_ONE_NODE() and
RTEMS_CHAIN_NODE_INITIALIZER_ONE_NODE_CHAIN().
Diffstat (limited to 'cpukit/score/include/rtems/score/chainimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/chainimpl.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/chainimpl.h b/cpukit/score/include/rtems/score/chainimpl.h index f87ce82098..98416b25e7 100644 --- a/cpukit/score/include/rtems/score/chainimpl.h +++ b/cpukit/score/include/rtems/score/chainimpl.h @@ -37,6 +37,22 @@ extern "C" { { { { &(name).Tail.Node, NULL }, &(name).Head.Node } } /** + * @brief Chain initializer for a chain with one @a node. + * + * @see CHAIN_NODE_INITIALIZER_ONE_NODE_CHAIN(). + */ +#define CHAIN_INITIALIZER_ONE_NODE( node ) \ + { { { (node), NULL }, (node) } } + +/** + * @brief Chain node initializer for a @a chain containing exactly this node. + * + * @see CHAIN_INITIALIZER_ONE_NODE(). + */ +#define CHAIN_NODE_INITIALIZER_ONE_NODE_CHAIN( chain ) \ + { &(chain)->Tail.Node, &(chain)->Head.Node } + +/** * @brief Chain definition for an empty chain with designator @a name. */ #define CHAIN_DEFINE_EMPTY(name) \ |