4.115
Last change
on this file since 439c494 was
3891983,
checked in by Sebastian Huber <sebastian.huber@…>, on 04/03/14 at 09:53:48
|
score: Add and use Scheduler_EDF_Control
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Scheduler EDF Yield |
---|
5 | * |
---|
6 | * @ingroup ScoreScheduler |
---|
7 | */ |
---|
8 | |
---|
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 |
---|
15 | * http://www.rtems.org/license/LICENSE. |
---|
16 | */ |
---|
17 | |
---|
18 | #if HAVE_CONFIG_H |
---|
19 | #include "config.h" |
---|
20 | #endif |
---|
21 | |
---|
22 | #include <rtems/score/scheduleredfimpl.h> |
---|
23 | |
---|
24 | void _Scheduler_EDF_Yield( Thread_Control *thread ) |
---|
25 | { |
---|
26 | Scheduler_EDF_Control *scheduler = |
---|
27 | _Scheduler_EDF_Instance(); |
---|
28 | ISR_Level level; |
---|
29 | |
---|
30 | Scheduler_EDF_Per_thread *thread_info = |
---|
31 | (Scheduler_EDF_Per_thread *) thread->scheduler_info; |
---|
32 | RBTree_Node *thread_node = &(thread_info->Node); |
---|
33 | |
---|
34 | _ISR_Disable( level ); |
---|
35 | |
---|
36 | /* |
---|
37 | * The RBTree has more than one node, enqueue behind the tasks |
---|
38 | * with the same priority in case there are such ones. |
---|
39 | */ |
---|
40 | _RBTree_Extract( &scheduler->Ready, thread_node ); |
---|
41 | _RBTree_Insert( &scheduler->Ready, thread_node ); |
---|
42 | |
---|
43 | _ISR_Flash( level ); |
---|
44 | |
---|
45 | _Scheduler_EDF_Schedule_body( thread, false ); |
---|
46 | |
---|
47 | _ISR_Enable( level ); |
---|
48 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.