summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include
diff options
context:
space:
mode:
authorThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2009-11-30 13:20:29 +0000
committerThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2009-11-30 13:20:29 +0000
commit5ad790ffbb2694dba185083fb338539d317abf01 (patch)
tree25cc6ba87a6e79271dfbe57b0d707fe78ebfd7b0 /cpukit/score/include
parentChanged base implementation of protected heap allocations to use _Heap_Alloca... (diff)
downloadrtems-5ad790ffbb2694dba185083fb338539d317abf01.tar.bz2
Added defines for initialization of empty chains.
Diffstat (limited to 'cpukit/score/include')
-rw-r--r--cpukit/score/include/rtems/score/chain.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/chain.h b/cpukit/score/include/rtems/score/chain.h
index 8dbef1e543..3d18adf64f 100644
--- a/cpukit/score/include/rtems/score/chain.h
+++ b/cpukit/score/include/rtems/score/chain.h
@@ -94,6 +94,22 @@ typedef struct {
} Chain_Control;
/**
+ * @brief Chain initializer for an empty chain with designator @a name.
+ */
+#define CHAIN_INITIALIZER_EMPTY(name) \
+ { \
+ (Chain_Node *) &(name).permanent_null, \
+ NULL, \
+ (Chain_Node *) &(name) \
+ }
+
+/**
+ * @brief Chain definition for an empty chain with designator @a name.
+ */
+#define CHAIN_DEFINE_EMPTY(name) \
+ Chain_Control name = CHAIN_INITIALIZER_EMPTY(name)
+
+/**
* @brief Initialize a Chain Header
*
* This routine initializes @a the_chain structure to manage the