summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/mpci.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-24 06:13:11 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-24 08:46:20 +0100
commit620b23ece54a0bb43189bb9c0f14adf447cbafe6 (patch)
tree10aa72eb67ac01ab85f932ac25c09ba3e5d97da8 /cpukit/score/src/mpci.c
parentscore: Fix interrupt profiling (diff)
downloadrtems-620b23ece54a0bb43189bb9c0f14adf447cbafe6.tar.bz2
score: Optimize _Thread_queue_Enqueue()
Move thread state for _Thread_queue_Enqueue() to the thread queue context. This reduces the parameter count of _Thread_queue_Enqueue() from five to four (ARM for example has only four function parameter registers). Since the thread state is used after several function calls inside _Thread_queue_Enqueue() this parameter was saved on the stack previously.
Diffstat (limited to 'cpukit/score/src/mpci.c')
-rw-r--r--cpukit/score/src/mpci.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/score/src/mpci.c b/cpukit/score/src/mpci.c
index 9981ab99ad..2f0a2ded2b 100644
--- a/cpukit/score/src/mpci.c
+++ b/cpukit/score/src/mpci.c
@@ -253,6 +253,10 @@ Status_Control _MPCI_Send_request_packet(
the_packet->timeout = _MPCI_table->default_timeout;
_Thread_queue_Context_initialize( &queue_context );
+ _Thread_queue_Context_set_thread_state(
+ &queue_context,
+ STATES_WAITING_FOR_RPC_REPLY | extra_state
+ );
_Thread_queue_Context_set_enqueue_callout(
&queue_context,
_MPCI_Enqueue_callout
@@ -276,7 +280,6 @@ Status_Control _MPCI_Send_request_packet(
&_MPCI_Remote_blocked_threads.Queue,
&_Thread_queue_Operations_FIFO,
executing,
- STATES_WAITING_FOR_RPC_REPLY | extra_state,
&queue_context
);
return _Thread_Wait_get_status( executing );