summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/sapi/inline/rtems/chain.inl23
2 files changed, 29 insertions, 0 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 49bf76404c..b5deb15134 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,11 @@
2008-11-20 Joel Sherrill <joel.sherrill@oarcorp.com>
+ PR 1340/cpukit
+ * sapi/inline/rtems/chain.inl: Add rtems_chain_initialize to public
+ chain API.
+
+2008-11-20 Joel Sherrill <joel.sherrill@oarcorp.com>
+
* score/include/rtems/score/heap.h,
score/include/rtems/score/protectedheap.h,
score/include/rtems/score/wkspace.h, score/src/heap.c,
diff --git a/cpukit/sapi/inline/rtems/chain.inl b/cpukit/sapi/inline/rtems/chain.inl
index 31d530edad..ff4808cecf 100644
--- a/cpukit/sapi/inline/rtems/chain.inl
+++ b/cpukit/sapi/inline/rtems/chain.inl
@@ -37,6 +37,29 @@
#include <rtems/score/chain.inl>
/**
+ * @brief Initialize a Chain Header
+ *
+ * This routine initializes @a the_chain structure to manage the
+ * contiguous array of @a number_nodes nodes which starts at
+ * @a starting_address. Each node is of @a node_size bytes.
+ *
+ * @param[in] the_chain specifies the chain to initialize
+ * @param[in] starting_address is the starting address of the array
+ * of elements
+ * @param[in] number_nodes is the number of nodes that will be in the chain
+ * @param[in] node_size is the size of each node
+ */
+RTEMS_INLINE_ROUTINE void rtems_chain_initialize(
+ rtems_chain_control *the_chain,
+ void *starting_address,
+ size_t number_nodes,
+ size_t node_size
+)
+{
+ _Chain_Initialize( the_chain, starting_address, number_nodes, node_size );
+}
+
+/**
* @brief Initialize this Chain as Empty
*
* This routine initializes the specified chain to contain zero nodes.