diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-11-20 21:11:38 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-11-20 21:11:38 +0000 |
commit | 74e8ad7cb5b4e9e2701a57d5c243f9fd5173aa3a (patch) | |
tree | 261872c1cfa8a56f881f3f3b453ce6954e0f9b2d /cpukit | |
parent | 2008-11-20 Daron Chabot <daronchabot@gmail.com> (diff) | |
download | rtems-74e8ad7cb5b4e9e2701a57d5c243f9fd5173aa3a.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')
-rw-r--r-- | cpukit/ChangeLog | 6 | ||||
-rw-r--r-- | cpukit/sapi/inline/rtems/chain.inl | 23 |
2 files changed, 29 insertions, 0 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index b91bdbf390..fc1aea29c2 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +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-13 Joel Sherrill <joel.sherrill@OARcorp.com> PR 1336/cpukit 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. |