summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/schedulersimplesmp.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-07-01 14:47:07 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-07-01 14:47:07 +0200
commitdf2177ab5ea1c5b183513cdcac729af9c4040110 (patch)
treec313d341042ae07b605a08055e1cd447619f38d0 /cpukit/score/src/schedulersimplesmp.c
parentscore: Fix MPCI message layout (diff)
downloadrtems-df2177ab5ea1c5b183513cdcac729af9c4040110.tar.bz2
score: Change scheduler node init and destroy
Provide the scheduler node to initialize or destroy to the corresponding operations. This makes it possible to have more than one scheduler node per thread.
Diffstat (limited to 'cpukit/score/src/schedulersimplesmp.c')
-rw-r--r--cpukit/score/src/schedulersimplesmp.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/cpukit/score/src/schedulersimplesmp.c b/cpukit/score/src/schedulersimplesmp.c
index f368ead556..8f86ea87da 100644
--- a/cpukit/score/src/schedulersimplesmp.c
+++ b/cpukit/score/src/schedulersimplesmp.c
@@ -44,26 +44,29 @@ void _Scheduler_simple_SMP_Initialize( const Scheduler_Control *scheduler )
void _Scheduler_simple_SMP_Node_initialize(
const Scheduler_Control *scheduler,
+ Scheduler_Node *node,
Thread_Control *the_thread,
Priority_Control priority
)
{
- Scheduler_SMP_Node *node = _Scheduler_SMP_Thread_get_own_node( the_thread );
+ Scheduler_SMP_Node *the_node;
- _Scheduler_SMP_Node_initialize( node, the_thread, priority );
+ the_node = _Scheduler_SMP_Node_downcast( node );
+ _Scheduler_SMP_Node_initialize( the_node, the_thread, priority );
}
static void _Scheduler_simple_SMP_Do_update(
Scheduler_Context *context,
- Scheduler_Node *node_to_update,
+ Scheduler_Node *node,
Priority_Control new_priority
)
{
- Scheduler_SMP_Node *node = _Scheduler_SMP_Node_downcast( node_to_update );
+ Scheduler_SMP_Node *the_node;
(void) context;
- _Scheduler_SMP_Node_update_priority( node, new_priority );
+ the_node = _Scheduler_SMP_Node_downcast( node );
+ _Scheduler_SMP_Node_update_priority( the_node, new_priority );
}
static Scheduler_Node *_Scheduler_simple_SMP_Get_highest_ready(