4.115
Last change
on this file since 0118ed6 was
0118ed6,
checked in by Joel Sherrill <joel.sherrill@…>, on 03/16/11 at 16:32:22
|
2011-03-16 Jennifer Averett <jennifer.averett@…>
PR 1743/cpu
- sapi/include/confdefs.h, score/Makefile.am, score/preinstall.am: Add
Simple Priority Scheduler as complement to existing Deterministic
Priority Scheduler. This scheduler serves both as an example and as a
lighter weight implementation for smaller systems.
- score/include/rtems/score/schedulersimple.h,
score/inline/rtems/score/schedulersimple.inl,
score/src/schedulersimple.c, score/src/schedulersimpleblock.c,
score/src/schedulersimpleenqueue.c,
score/src/schedulersimpleenqueuefirst.c,
score/src/schedulersimpleextract.c,
score/src/schedulersimplereadyqueueenqueue.c,
score/src/schedulersimplereadyqueueenqueuefirst.c,
score/src/schedulersimpleschedule.c,
score/src/schedulersimpleunblock.c, score/src/schedulersimpleyield.c:
New files.
|
-
Property mode set to
100644
|
File size:
919 bytes
|
Line | |
---|
1 | /* |
---|
2 | * Scheduler Simple Handler / Yield |
---|
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 found in the file LICENSE in this distribution or at |
---|
9 | * http://www.rtems.com/license/LICENSE. |
---|
10 | * |
---|
11 | * $Id$ |
---|
12 | */ |
---|
13 | |
---|
14 | #if HAVE_CONFIG_H |
---|
15 | #include "config.h" |
---|
16 | #endif |
---|
17 | |
---|
18 | #include <rtems/system.h> |
---|
19 | #include <rtems/score/isr.h> |
---|
20 | #include <rtems/score/scheduler.h> |
---|
21 | #include <rtems/score/thread.h> |
---|
22 | #include <rtems/score/schedulersimple.h> |
---|
23 | |
---|
24 | void _Scheduler_simple_Yield( void ) |
---|
25 | { |
---|
26 | ISR_Level level; |
---|
27 | Thread_Control *executing; |
---|
28 | |
---|
29 | executing = _Thread_Executing; |
---|
30 | _ISR_Disable( level ); |
---|
31 | |
---|
32 | _Scheduler_simple_Ready_queue_Requeue(&_Scheduler, executing); |
---|
33 | |
---|
34 | _ISR_Flash( level ); |
---|
35 | |
---|
36 | _Scheduler_simple_Schedule(); |
---|
37 | |
---|
38 | if ( !_Thread_Is_heir( executing ) ) |
---|
39 | _Thread_Dispatch_necessary = true; |
---|
40 | |
---|
41 | _ISR_Enable( level ); |
---|
42 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.