summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/schedulerstrongapa.c
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/src/schedulerstrongapa.c
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 '')
-rw-r--r--cpukit/score/src/schedulerstrongapa.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/cpukit/score/src/schedulerstrongapa.c b/cpukit/score/src/schedulerstrongapa.c
index d5bfed74f4..57ffb61367 100644
--- a/cpukit/score/src/schedulerstrongapa.c
+++ b/cpukit/score/src/schedulerstrongapa.c
@@ -64,19 +64,23 @@ static void _Scheduler_strong_APA_Move_from_ready_to_scheduled(
Scheduler_Node *ready_to_scheduled
)
{
- Scheduler_strong_APA_Context *self =
- _Scheduler_strong_APA_Get_self( context );
- Scheduler_strong_APA_Node *node =
- _Scheduler_strong_APA_Node_downcast( ready_to_scheduled );
+ Scheduler_strong_APA_Context *self;
+ Scheduler_strong_APA_Node *node;
+ Priority_Control priority;
+
+ self = _Scheduler_strong_APA_Get_self( context );
+ node = _Scheduler_strong_APA_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
);
}