4.115
Last change
on this file since df40cc9 was
c499856,
checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47
|
Change all references of rtems.com to rtems.org.
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[f839bf5a] | 1 | /** |
---|
| 2 | * @file |
---|
| 3 | * |
---|
| 4 | * @brief Scheduler EDF Yield |
---|
| 5 | * |
---|
| 6 | * @ingroup ScoreScheduler |
---|
| 7 | */ |
---|
| 8 | |
---|
[5472ad41] | 9 | /* |
---|
| 10 | * Copyright (C) 2011 Petr Benes. |
---|
| 11 | * Copyright (C) 2011 On-Line Applications Research Corporation (OAR). |
---|
| 12 | * |
---|
| 13 | * The license and distribution terms for this file may be |
---|
| 14 | * found in the file LICENSE in this distribution or at |
---|
[c499856] | 15 | * http://www.rtems.org/license/LICENSE. |
---|
[5472ad41] | 16 | */ |
---|
| 17 | |
---|
| 18 | #if HAVE_CONFIG_H |
---|
| 19 | #include "config.h" |
---|
| 20 | #endif |
---|
| 21 | |
---|
[e5ca54c9] | 22 | #include <rtems/score/scheduleredfimpl.h> |
---|
[5472ad41] | 23 | |
---|
[6eba7c85] | 24 | void _Scheduler_EDF_Yield( Thread_Control *thread ) |
---|
[5472ad41] | 25 | { |
---|
| 26 | ISR_Level level; |
---|
| 27 | |
---|
[6eba7c85] | 28 | Scheduler_EDF_Per_thread *thread_info = |
---|
| 29 | (Scheduler_EDF_Per_thread *) thread->scheduler_info; |
---|
| 30 | RBTree_Node *thread_node = &(thread_info->Node); |
---|
[5472ad41] | 31 | |
---|
| 32 | _ISR_Disable( level ); |
---|
| 33 | |
---|
[40ee2fc0] | 34 | /* |
---|
| 35 | * The RBTree has more than one node, enqueue behind the tasks |
---|
| 36 | * with the same priority in case there are such ones. |
---|
| 37 | */ |
---|
[4ea97d24] | 38 | _RBTree_Extract( &_Scheduler_EDF_Ready_queue, thread_node ); |
---|
| 39 | _RBTree_Insert( &_Scheduler_EDF_Ready_queue, thread_node ); |
---|
[40ee2fc0] | 40 | |
---|
| 41 | _ISR_Flash( level ); |
---|
| 42 | |
---|
[e5ca54c9] | 43 | _Scheduler_EDF_Schedule_body( thread, false ); |
---|
[5472ad41] | 44 | |
---|
| 45 | _ISR_Enable( level ); |
---|
| 46 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.