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 | * Schedule Simple Handler / Ready Queue Enqueue First |
---|
3 | * |
---|
4 | * COPYRIGHT (c) 2011. |
---|
5 | * On-Line Applications Research Corporation (OAR). |
---|
6 | * |
---|
7 | * The license and distribution terms for this file may be |
---|
8 | * found in the file LICENSE in this distribution or at |
---|
9 | * http://www.rtems.com/license/LICENSE. |
---|
10 | */ |
---|
11 | |
---|
12 | #if HAVE_CONFIG_H |
---|
13 | #include "config.h" |
---|
14 | #endif |
---|
15 | |
---|
16 | #include <rtems/system.h> |
---|
17 | #include <rtems/score/chain.h> |
---|
18 | #include <rtems/score/thread.h> |
---|
19 | #include <rtems/score/schedulersimple.h> |
---|
20 | |
---|
21 | void _Scheduler_simple_Ready_queue_enqueue_first( |
---|
22 | Thread_Control *the_thread |
---|
23 | ) |
---|
24 | { |
---|
25 | Chain_Control *ready; |
---|
26 | Chain_Node *the_node; |
---|
27 | Thread_Control *current; |
---|
28 | |
---|
29 | ready = (Chain_Control *)_Scheduler.information; |
---|
30 | current = (Thread_Control *)ready; |
---|
31 | |
---|
32 | /* |
---|
33 | * Do NOT need to check for end of chain because there is always |
---|
34 | * at least one task on the ready chain -- the IDLE task. It can |
---|
35 | * never block, should never attempt to obtain a semaphore or mutex, |
---|
36 | * and thus will always be there. |
---|
37 | */ |
---|
38 | for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { |
---|
39 | current = (Thread_Control *) the_node; |
---|
40 | |
---|
41 | /* break when AT HEAD OF (or PAST) our priority */ |
---|
42 | if ( the_thread->current_priority <= current->current_priority ) { |
---|
43 | current = (Thread_Control *)current->Object.Node.previous; |
---|
44 | break; |
---|
45 | } |
---|
46 | } |
---|
47 | |
---|
48 | /* enqueue */ |
---|
49 | _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); |
---|
50 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.