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/schedulerpriority.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'cpukit/score/src/schedulerpriority.c') diff --git a/cpukit/score/src/schedulerpriority.c b/cpukit/score/src/schedulerpriority.c index 2719697ba3..11cee92424 100644 --- a/cpukit/score/src/schedulerpriority.c +++ b/cpukit/score/src/schedulerpriority.c @@ -35,19 +35,20 @@ void _Scheduler_priority_Initialize( const Scheduler_Control *scheduler ) void _Scheduler_priority_Node_initialize( const Scheduler_Control *scheduler, + Scheduler_Node *node, Thread_Control *the_thread, Priority_Control priority ) { Scheduler_priority_Context *context; - Scheduler_priority_Node *node; + Scheduler_priority_Node *the_node; - context = _Scheduler_priority_Get_context( scheduler ); - node = _Scheduler_priority_Thread_get_node( the_thread ); + _Scheduler_Node_do_initialize( node, the_thread, priority ); - _Scheduler_Node_do_initialize( &node->Base, the_thread, priority ); + context = _Scheduler_priority_Get_context( scheduler ); + the_node = _Scheduler_priority_Node_downcast( node ); _Scheduler_priority_Ready_queue_update( - &node->Ready_queue, + &the_node->Ready_queue, priority, &context->Bit_map, &context->Ready[ 0 ] -- cgit v1.2.3