4.115
Last change
on this file since 64939bc was
64939bc,
checked in by Sebastian Huber <sebastian.huber@…>, on 07/12/14 at 19:22:22
|
rbtree: Reduce RBTree_Control size
Remove compare function and is unique indicator from the control
structure. Rename RBTree_Compare_function to RBTree_Compare. Rename
rtems_rbtree_compare_function to rtems_rbtree_compare. Provide C++
compatible initializers. Add compare function and is unique indicator
to _RBTree_Find(), _RBTree_Insert(), rtems_rbtree_find() and
rtems_rbtree_insert(). Remove _RBTree_Is_unique() and
rtems_rbtree_is_unique(). Remove compare function and is unique
indicator from _RBTree_Initialize_empty() and
rtems_rbtree_initialize_empty().
|
-
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 | Scheduler_Void_or_thread _Scheduler_EDF_Yield( |
---|
25 | const Scheduler_Control *scheduler, |
---|
26 | Thread_Control *the_thread |
---|
27 | ) |
---|
28 | { |
---|
29 | Scheduler_EDF_Context *context = |
---|
30 | _Scheduler_EDF_Get_context( scheduler ); |
---|
31 | Scheduler_EDF_Node *node = _Scheduler_EDF_Thread_get_node( the_thread ); |
---|
32 | |
---|
33 | /* |
---|
34 | * The RBTree has more than one node, enqueue behind the tasks |
---|
35 | * with the same priority in case there are such ones. |
---|
36 | */ |
---|
37 | _RBTree_Extract( &context->Ready, &node->Node ); |
---|
38 | _RBTree_Insert( |
---|
39 | &context->Ready, |
---|
40 | &node->Node, |
---|
41 | _Scheduler_EDF_Compare, |
---|
42 | false |
---|
43 | ); |
---|
44 | |
---|
45 | _Scheduler_EDF_Schedule_body( scheduler, the_thread, false ); |
---|
46 | |
---|
47 | SCHEDULER_RETURN_VOID_OR_NULL; |
---|
48 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.