diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-25 16:00:17 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-11-06 09:06:21 +0100 |
commit | 0c286e3d7c176a4fb7faf6ba9f809996d599ca10 (patch) | |
tree | bf30809e9a4f92d19254fa1acb1f833effa8dc40 /cpukit/score/src/schedulerpriorityaffinitysmp.c | |
parent | score: Remove superfluous include (diff) | |
download | rtems-0c286e3d7c176a4fb7faf6ba9f809996d599ca10.tar.bz2 |
score: _Chain_Insert_ordered_unprotected()
Change the chain order relation to use a directly specified left hand
side value. This is similar to _RBTree_Insert_inline() and helps the
compiler to better optimize the code.
Diffstat (limited to 'cpukit/score/src/schedulerpriorityaffinitysmp.c')
-rw-r--r-- | cpukit/score/src/schedulerpriorityaffinitysmp.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/cpukit/score/src/schedulerpriorityaffinitysmp.c b/cpukit/score/src/schedulerpriorityaffinitysmp.c index 6caf00c3a0..a948eef0fc 100644 --- a/cpukit/score/src/schedulerpriorityaffinitysmp.c +++ b/cpukit/score/src/schedulerpriorityaffinitysmp.c @@ -40,7 +40,7 @@ */ static bool _Scheduler_priority_affinity_SMP_Insert_priority_lifo_order( - const Chain_Node *to_insert, + const void *to_insert, const Chain_Node *next ) { @@ -49,7 +49,7 @@ static bool _Scheduler_priority_affinity_SMP_Insert_priority_lifo_order( } static bool _Scheduler_priority_affinity_SMP_Insert_priority_fifo_order( - const Chain_Node *to_insert, + const void *to_insert, const Chain_Node *next ) { @@ -283,6 +283,8 @@ static void _Scheduler_priority_affinity_SMP_Check_for_migrations( self = _Scheduler_priority_SMP_Get_self( context ); while (1) { + Priority_Control lowest_scheduled_priority; + if ( _Priority_bit_map_Is_empty( &self->Bit_map ) ) { /* Nothing to do */ break; @@ -310,9 +312,12 @@ static void _Scheduler_priority_affinity_SMP_Check_for_migrations( if ( lowest_scheduled == NULL ) break; + lowest_scheduled_priority = + _Scheduler_SMP_Node_priority( lowest_scheduled ); + if ( _Scheduler_SMP_Insert_priority_lifo_order( - &lowest_scheduled->Node.Chain, + &lowest_scheduled_priority, &highest_ready->Node.Chain ) ) { |