5
Last change
on this file since 2548d14 was
300f6a48,
checked in by Sebastian Huber <sebastian.huber@…>, on 06/22/16 at 15:09:23
|
score: Rework thread priority management
Add priority nodes which contribute to the overall thread priority.
The actual priority of a thread is now an aggregation of priority nodes.
The thread priority aggregation for the home scheduler instance of a
thread consists of at least one priority node, which is normally the
real priority of the thread. The locking protocols (e.g. priority
ceiling and priority inheritance), rate-monotonic period objects and the
POSIX sporadic server add, change and remove priority nodes.
A thread changes its priority now immediately, e.g. priority changes are
not deferred until the thread releases its last resource.
Replace the _Thread_Change_priority() function with
- _Thread_Priority_perform_actions(),
- _Thread_Priority_add(),
- _Thread_Priority_remove(),
- _Thread_Priority_change(), and
- _Thread_Priority_update().
Update #2412.
Update #2556.
|
-
Property mode set to
100644
|
File size:
877 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Scheduler EDF Allocate |
---|
5 | * @ingroup ScoreScheduler |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * Copyright (C) 2011 Petr Benes. |
---|
10 | * Copyright (C) 2011 On-Line Applications Research Corporation (OAR). |
---|
11 | * |
---|
12 | * The license and distribution terms for this file may be |
---|
13 | * found in the file LICENSE in this distribution or at |
---|
14 | * http://www.rtems.org/license/LICENSE. |
---|
15 | */ |
---|
16 | |
---|
17 | #if HAVE_CONFIG_H |
---|
18 | #include "config.h" |
---|
19 | #endif |
---|
20 | |
---|
21 | #include <rtems/score/scheduleredfimpl.h> |
---|
22 | |
---|
23 | void _Scheduler_EDF_Node_initialize( |
---|
24 | const Scheduler_Control *scheduler, |
---|
25 | Scheduler_Node *node, |
---|
26 | Thread_Control *the_thread, |
---|
27 | Priority_Control priority |
---|
28 | ) |
---|
29 | { |
---|
30 | Scheduler_EDF_Node *the_node; |
---|
31 | |
---|
32 | _Scheduler_Node_do_initialize( scheduler, node, the_thread, priority ); |
---|
33 | |
---|
34 | the_node = _Scheduler_EDF_Node_downcast( node ); |
---|
35 | _RBTree_Initialize_node( &the_node->Node ); |
---|
36 | the_node->priority = priority; |
---|
37 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.