diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-24 06:13:11 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-24 08:46:20 +0100 |
commit | 620b23ece54a0bb43189bb9c0f14adf447cbafe6 (patch) | |
tree | 10aa72eb67ac01ab85f932ac25c09ba3e5d97da8 /cpukit/score/src/threadqenqueue.c | |
parent | score: Fix interrupt profiling (diff) | |
download | rtems-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/threadqenqueue.c')
-rw-r--r-- | cpukit/score/src/threadqenqueue.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c index f04f44c9c0..7ffef336b4 100644 --- a/cpukit/score/src/threadqenqueue.c +++ b/cpukit/score/src/threadqenqueue.c @@ -414,7 +414,6 @@ void _Thread_queue_Enqueue( Thread_queue_Queue *queue, const Thread_queue_Operations *operations, Thread_Control *the_thread, - States_Control state, Thread_queue_Context *queue_context ) { @@ -423,7 +422,7 @@ void _Thread_queue_Enqueue( #if defined(RTEMS_MULTIPROCESSING) if ( _Thread_MP_Is_receive( the_thread ) && the_thread->receive_packet ) { - the_thread = _Thread_MP_Allocate_proxy( state ); + the_thread = _Thread_MP_Allocate_proxy( queue_context->thread_state ); } #endif @@ -456,7 +455,7 @@ void _Thread_queue_Enqueue( /* * Set the blocking state for this thread queue in the thread. */ - _Thread_Set_state( the_thread, state ); + _Thread_Set_state( the_thread, queue_context->thread_state ); /* * If the thread wants to timeout, then schedule its timer. |