RCS file: /usr1/CVS/rtems/cpukit/sapi/inline/rtems/chain.inl,v
retrieving revision 1.4
diff -u -r1.4 chain.inl
|
|
|
37 | 37 | #include <rtems/score/chain.inl> |
38 | 38 | |
39 | 39 | /** |
| 40 | * @brief Initialize a Chain Header |
| 41 | * |
| 42 | * This routine initializes @a the_chain structure to manage the |
| 43 | * contiguous array of @a number_nodes nodes which starts at |
| 44 | * @a starting_address. Each node is of @a node_size bytes. |
| 45 | * |
| 46 | * @param[in] the_chain specifies the chain to initialize |
| 47 | * @param[in] starting_address is the starting address of the array |
| 48 | * of elements |
| 49 | * @param[in] number_nodes is the number of nodes that will be in the chain |
| 50 | * @param[in] node_size is the size of each node |
| 51 | */ |
| 52 | RTEMS_INLINE_ROUTINE void rtems_chain_initialize( |
| 53 | rtems_chain_control *the_chain, |
| 54 | void *starting_address, |
| 55 | size_t number_nodes, |
| 56 | size_t node_size |
| 57 | ) |
| 58 | { |
| 59 | _Chain_Initialize( the_chain, starting_address, number_nodes, node_size ); |
| 60 | } |
| 61 | |
| 62 | /** |
40 | 63 | * @brief Initialize this Chain as Empty |
41 | 64 | * |
42 | 65 | * This routine initializes the specified chain to contain zero nodes. |
RCS file: /usr1/CVS/rtems/doc/user/chains.t,v
retrieving revision 1.4
diff -u -r1.4 chains.t
|
|
|
21 | 21 | @c build_id |
22 | 22 | @item @code{@value{DIRPREFIX}chain_node} - Chain node used in user objects |
23 | 23 | @item @code{@value{DIRPREFIX}chain_control} - Chain control node |
| 24 | @item @code{@value{DIRPREFIX}chain_initialize} - initialize the chain with nodes |
24 | 25 | @item @code{@value{DIRPREFIX}chain_initialize_empty} - initialize the chain as empty |
25 | 26 | @item @code{@value{DIRPREFIX}chain_is_null_node} - Is the node NULL ? |
26 | 27 | @item @code{@value{DIRPREFIX}chain_head} - Return the chain's head |
… |
… |
|
196 | 197 | The section details the Chains directives. |
197 | 198 | |
198 | 199 | @c |
| 200 | @c Initialize this Chain With Nodes |
| 201 | @c |
| 202 | @page |
| 203 | @subsection Initialize Chain With Nodes |
| 204 | |
| 205 | @cindex chain initialize |
| 206 | |
| 207 | @subheading CALLING SEQUENCE: |
| 208 | |
| 209 | @ifset is-C |
| 210 | @findex @value{DIRPREFIX}chain_initialize |
| 211 | @example |
| 212 | void @value{DIRPREFIX}chain_initialize( |
| 213 | @value{DIRPREFIX}chain_control *the_chain, |
| 214 | void *starting_address, |
| 215 | size_t number_nodes, |
| 216 | size_t node_size |
| 217 | ) |
| 218 | @end example |
| 219 | @end ifset |
| 220 | |
| 221 | @subheading RETURNS |
| 222 | |
| 223 | Returns nothing. |
| 224 | |
| 225 | @subheading DESCRIPTION: |
| 226 | |
| 227 | This function take in a pointer to a chain control and initializes it |
| 228 | to contain a set of chain nodes. The chain will contain @code{number_nodes} |
| 229 | chain nodes from the memory pointed to by @code{start_address}. Each node |
| 230 | is assumed to be @code{node_size} bytes. |
| 231 | |
| 232 | @subheading NOTES: |
| 233 | |
| 234 | This call will discard any nodes on the chain. |
| 235 | |
| 236 | This call does NOT inititialize any user data on each node. |
| 237 | |
| 238 | @c |
199 | 239 | @c Initialize this Chain as Empty |
200 | 240 | @c |
201 | 241 | @page |
202 | | @subsection Initialise Empty |
| 242 | @subsection Initialize Empty |
203 | 243 | |
204 | | @cindex chain initialise empty |
| 244 | @cindex chain initialize empty |
205 | 245 | |
206 | 246 | @subheading CALLING SEQUENCE: |
207 | 247 | |