From df2177ab5ea1c5b183513cdcac729af9c4040110 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 1 Jul 2016 14:47:07 +0200 Subject: 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. --- cpukit/score/src/schedulersimplesmp.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'cpukit/score/src/schedulersimplesmp.c') 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( -- cgit v1.2.3