Changeset 620b23e in rtems for cpukit/posix/src/nanosleep.c


Ignore:
Timestamp:
Nov 24, 2016, 5:13:11 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
bd0d585
Parents:
4b5ff47
git-author:
Sebastian Huber <sebastian.huber@…> (11/24/16 05:13:11)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/24/16 07:46:20)
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/src/nanosleep.c

    r4b5ff47 r620b23e  
    4848
    4949  _Thread_queue_Context_initialize( &queue_context );
     50  _Thread_queue_Context_set_thread_state(
     51    &queue_context,
     52    STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
     53  );
    5054  _Thread_queue_Context_set_enqueue_callout(
    5155    &queue_context,
     
    6771    &_Thread_queue_Operations_FIFO,
    6872    _Thread_Executing,
    69     STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL,
    7073    &queue_context
    7174  );
Note: See TracChangeset for help on using the changeset viewer.