From db03bcc17cffe8c86172452755f64e5505e9219d Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 20 Nov 2008 21:12:59 +0000 Subject: 2008-11-20 Joel Sherrill PR 1340/cpukit * sapi/inline/rtems/chain.inl: Add rtems_chain_initialize to public chain API. --- cpukit/ChangeLog | 6 ++++++ cpukit/sapi/inline/rtems/chain.inl | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 49bf76404c..b5deb15134 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +2008-11-20 Joel Sherrill + + PR 1340/cpukit + * sapi/inline/rtems/chain.inl: Add rtems_chain_initialize to public + chain API. + 2008-11-20 Joel Sherrill * score/include/rtems/score/heap.h, 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 @@ -36,6 +36,29 @@ #include +/** + * @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 * -- cgit v1.2.3