4.115
Last change
on this file since 62181b21 was
9b4422a2,
checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24
|
Remove All CVS Id Strings Possible Using a Script
Script does what is expected and tries to do it as
smartly as possible.
+ remove occurrences of two blank comment lines
next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
contain CVS Ids
+ If the processing left a blank line at the top of
a file, it was removed.
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | /* |
---|
2 | * COPYRIGHT (c) 1989-2007. |
---|
3 | * On-Line Applications Research Corporation (OAR). |
---|
4 | * |
---|
5 | * The license and distribution terms for this file may be |
---|
6 | * found in the file LICENSE in this distribution or at |
---|
7 | * http://www.rtems.com/license/LICENSE. |
---|
8 | */ |
---|
9 | |
---|
10 | #if HAVE_CONFIG_H |
---|
11 | #include "config.h" |
---|
12 | #endif |
---|
13 | |
---|
14 | #include <rtems/system.h> |
---|
15 | #include <rtems/score/address.h> |
---|
16 | #include <rtems/score/chain.h> |
---|
17 | #include <rtems/score/isr.h> |
---|
18 | |
---|
19 | /* |
---|
20 | * _Chain_Initialize |
---|
21 | * |
---|
22 | * This kernel routine initializes a doubly linked chain. |
---|
23 | * |
---|
24 | * Input parameters: |
---|
25 | * the_chain - pointer to chain header |
---|
26 | * starting_address - starting address of first node |
---|
27 | * number_nodes - number of nodes in chain |
---|
28 | * node_size - size of node in bytes |
---|
29 | * |
---|
30 | * Output parameters: NONE |
---|
31 | */ |
---|
32 | |
---|
33 | void _Chain_Initialize( |
---|
34 | Chain_Control *the_chain, |
---|
35 | void *starting_address, |
---|
36 | size_t number_nodes, |
---|
37 | size_t node_size |
---|
38 | ) |
---|
39 | { |
---|
40 | size_t count = number_nodes; |
---|
41 | Chain_Node *head = _Chain_Head( the_chain ); |
---|
42 | Chain_Node *tail = _Chain_Tail( the_chain ); |
---|
43 | Chain_Node *current = head; |
---|
44 | Chain_Node *next = starting_address; |
---|
45 | |
---|
46 | head->previous = NULL; |
---|
47 | |
---|
48 | while ( count-- ) { |
---|
49 | current->next = next; |
---|
50 | next->previous = current; |
---|
51 | current = next; |
---|
52 | next = (Chain_Node *) |
---|
53 | _Addresses_Add_offset( (void *) next, node_size ); |
---|
54 | } |
---|
55 | |
---|
56 | current->next = tail; |
---|
57 | tail->previous = current; |
---|
58 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.