diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-07-01 14:47:07 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-07-01 14:47:07 +0200 |
commit | df2177ab5ea1c5b183513cdcac729af9c4040110 (patch) | |
tree | c313d341042ae07b605a08055e1cd447619f38d0 /cpukit/score/src/schedulerprioritysmp.c | |
parent | score: Fix MPCI message layout (diff) | |
download | rtems-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/schedulerprioritysmp.c')
-rw-r--r-- | cpukit/score/src/schedulerprioritysmp.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/cpukit/score/src/schedulerprioritysmp.c b/cpukit/score/src/schedulerprioritysmp.c index aba863e66a..07e7af4268 100644 --- a/cpukit/score/src/schedulerprioritysmp.c +++ b/cpukit/score/src/schedulerprioritysmp.c @@ -47,23 +47,22 @@ void _Scheduler_priority_SMP_Initialize( const Scheduler_Control *scheduler ) void _Scheduler_priority_SMP_Node_initialize( const Scheduler_Control *scheduler, + Scheduler_Node *node, Thread_Control *the_thread, Priority_Control priority ) { Scheduler_Context *context; Scheduler_priority_SMP_Context *self; - Scheduler_priority_SMP_Node *node; + Scheduler_priority_SMP_Node *the_node; + + the_node = _Scheduler_priority_SMP_Node_downcast( node ); + _Scheduler_SMP_Node_initialize( &the_node->Base, the_thread, priority ); context = _Scheduler_Get_context( scheduler ); self = _Scheduler_priority_SMP_Get_self( context ); - node = _Scheduler_priority_SMP_Node_downcast( - _Scheduler_Thread_get_own_node( the_thread ) - ); - - _Scheduler_SMP_Node_initialize( &node->Base, the_thread, priority ); _Scheduler_priority_Ready_queue_update( - &node->Ready_queue, + &the_node->Ready_queue, priority, &self->Bit_map, &self->Ready[ 0 ] |