Changeset 4e1304d in rtems


Ignore:
Timestamp:
Jan 22, 2008, 7:10:04 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
11c16a64
Parents:
8b7a713
Message:

2008-01-22 Joel Sherrill <joel.sherrill@…>

  • score/src/threadqfirst.c: Remove switch.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r8b7a713 r4e1304d  
     12008-01-22      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * score/src/threadqfirst.c: Remove switch.
     4
    152008-01-22      Joel Sherrill <joel.sherrill@oarcorp.com>
    26
  • cpukit/score/src/threadqfirst.c

    r8b7a713 r4e1304d  
    4444)
    4545{
    46   Thread_Control *the_thread;
     46  Thread_Control * (*first_p)(Thread_queue_Control *);
    4747
    48   switch ( the_thread_queue->discipline ) {
    49     case THREAD_QUEUE_DISCIPLINE_FIFO:
    50       the_thread = _Thread_queue_First_fifo( the_thread_queue );
    51       break;
    52     case THREAD_QUEUE_DISCIPLINE_PRIORITY:
    53       the_thread = _Thread_queue_First_priority( the_thread_queue );
    54       break;
    55     default:              /* this is only to prevent warnings */
    56       the_thread = NULL;
    57       break;
    58   }
     48  if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
     49      first_p = _Thread_queue_First_priority;
     50  else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
     51      first_p = _Thread_queue_First_fifo;
    5952
    60   return the_thread;
     53  return (*first_p)( the_thread_queue );
    6154}
Note: See TracChangeset for help on using the changeset viewer.