summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/inline
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-11-20 21:12:59 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-11-20 21:12:59 +0000
commitdb03bcc17cffe8c86172452755f64e5505e9219d (patch)
tree18e5b4e0d3654787b8111fcd5544ee713cb389e5 /cpukit/sapi/inline
parent2008-11-20 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-db03bcc17cffe8c86172452755f64e5505e9219d.tar.bz2
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.
Diffstat (limited to 'cpukit/sapi/inline')
-rw-r--r--cpukit/sapi/inline/rtems/chain.inl23
1 files changed, 23 insertions, 0 deletions
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.