Changeset 1506658c in rtems for cpukit/score/src/threadstart.c


Ignore:
Timestamp:
01/08/16 11:11:03 (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
599d71f
Parents:
ccd5434
git-author:
Sebastian Huber <sebastian.huber@…> (01/08/16 11:11:03)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/11/16 07:47:24)
Message:

score: Simplify _Thread_Start()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/threadstart.c

    rccd5434 r1506658c  
    2222#include <rtems/score/threadimpl.h>
    2323#include <rtems/score/isrlevel.h>
    24 #include <rtems/score/schedulerimpl.h>
    2524#include <rtems/score/userextimpl.h>
    2625
    2726bool _Thread_Start(
    2827  Thread_Control                 *the_thread,
    29   const Thread_Entry_information *entry,
    30   Per_CPU_Control                *cpu
     28  const Thread_Entry_information *entry
    3129)
    3230{
     
    3432    the_thread->Start.Entry = *entry;
    3533    _Thread_Load_environment( the_thread );
    36 
    37     if ( cpu == NULL ) {
    38       _Thread_Ready( the_thread );
    39     } else {
    40       const Scheduler_Control *scheduler = _Scheduler_Get_by_CPU( cpu );
    41 
    42       if ( scheduler != NULL ) {
    43         the_thread->current_state = STATES_READY;
    44         _Scheduler_Start_idle( scheduler, the_thread, cpu );
    45       }
    46     }
    47 
     34    _Thread_Ready( the_thread );
    4835    _User_extensions_Thread_start( the_thread );
    4936
Note: See TracChangeset for help on using the changeset viewer.