summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/schedulerprioritysmpimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-25 16:00:17 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-11-06 09:06:21 +0100
commit0c286e3d7c176a4fb7faf6ba9f809996d599ca10 (patch)
treebf30809e9a4f92d19254fa1acb1f833effa8dc40 /cpukit/score/include/rtems/score/schedulerprioritysmpimpl.h
parentscore: Remove superfluous include (diff)
downloadrtems-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/include/rtems/score/schedulerprioritysmpimpl.h')
-rw-r--r--cpukit/score/include/rtems/score/schedulerprioritysmpimpl.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/cpukit/score/include/rtems/score/schedulerprioritysmpimpl.h b/cpukit/score/include/rtems/score/schedulerprioritysmpimpl.h
index f37414c7a8..073a7ade06 100644
--- a/cpukit/score/include/rtems/score/schedulerprioritysmpimpl.h
+++ b/cpukit/score/include/rtems/score/schedulerprioritysmpimpl.h
@@ -88,19 +88,23 @@ static inline void _Scheduler_priority_SMP_Move_from_ready_to_scheduled(
Scheduler_Node *ready_to_scheduled
)
{
- Scheduler_priority_SMP_Context *self =
- _Scheduler_priority_SMP_Get_self( context );
- Scheduler_priority_SMP_Node *node =
- _Scheduler_priority_SMP_Node_downcast( ready_to_scheduled );
+ Scheduler_priority_SMP_Context *self;
+ Scheduler_priority_SMP_Node *node;
+ Priority_Control priority;
+
+ self = _Scheduler_priority_SMP_Get_self( context );
+ node = _Scheduler_priority_SMP_Node_downcast( ready_to_scheduled );
_Scheduler_priority_Ready_queue_extract(
&node->Base.Base.Node.Chain,
&node->Ready_queue,
&self->Bit_map
);
+ priority = node->Base.priority;
_Chain_Insert_ordered_unprotected(
&self->Base.Scheduled,
&node->Base.Base.Node.Chain,
+ &priority,
_Scheduler_SMP_Insert_priority_fifo_order
);
}