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/schedulerpriorityaffinitysmp.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 '')
-rw-r--r-- | cpukit/score/src/schedulerpriorityaffinitysmp.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/cpukit/score/src/schedulerpriorityaffinitysmp.c b/cpukit/score/src/schedulerpriorityaffinitysmp.c index cec09729fb..e171d5e5c7 100644 --- a/cpukit/score/src/schedulerpriorityaffinitysmp.c +++ b/cpukit/score/src/schedulerpriorityaffinitysmp.c @@ -60,15 +60,6 @@ static bool _Scheduler_priority_affinity_SMP_Insert_priority_fifo_order( && _Scheduler_SMP_Insert_priority_fifo_order( to_insert, next ); } -static Scheduler_priority_affinity_SMP_Node * -_Scheduler_priority_affinity_SMP_Thread_get_own_node( - Thread_Control *thread -) -{ - return (Scheduler_priority_affinity_SMP_Node *) - _Scheduler_Thread_get_own_node( thread ); -} - /* * This method returns the scheduler node for the specified thread * as a scheduler specific type. @@ -96,20 +87,21 @@ _Scheduler_priority_affinity_SMP_Node_downcast( */ void _Scheduler_priority_affinity_SMP_Node_initialize( const Scheduler_Control *scheduler, + Scheduler_Node *node, Thread_Control *the_thread, Priority_Control priority ) { - Scheduler_priority_affinity_SMP_Node *node = - _Scheduler_priority_affinity_SMP_Thread_get_own_node( the_thread ); + Scheduler_priority_affinity_SMP_Node *the_node; - _Scheduler_priority_SMP_Node_initialize( scheduler, the_thread, priority ); + _Scheduler_priority_SMP_Node_initialize( scheduler, node, the_thread, priority ); /* * All we add is affinity information to the basic SMP node. */ - node->Affinity = *_CPU_set_Default(); - node->Affinity.set = &node->Affinity.preallocated; + the_node = _Scheduler_priority_affinity_SMP_Node_downcast( node ); + the_node->Affinity = *_CPU_set_Default(); + the_node->Affinity.set = &the_node->Affinity.preallocated; } /* |