diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-06 15:28:41 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-14 16:26:07 +0200 |
commit | 1ccb64e18f1e4c1f51c12b9dc31a881e2829b2b6 (patch) | |
tree | cc5940c391f4e6fcdd63ec31fd129126d84b2329 /cpukit/score/src/threadstart.c | |
parent | score: Simplify _Thread_Create_idle() (diff) | |
download | rtems-1ccb64e18f1e4c1f51c12b9dc31a881e2829b2b6.tar.bz2 |
scheduler: Add start idle thread operation
Add and use _Scheduler_Start_idle().
Diffstat (limited to 'cpukit/score/src/threadstart.c')
-rw-r--r-- | cpukit/score/src/threadstart.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cpukit/score/src/threadstart.c b/cpukit/score/src/threadstart.c index d9ce62a091..4e24f39cfc 100644 --- a/cpukit/score/src/threadstart.c +++ b/cpukit/score/src/threadstart.c @@ -38,7 +38,8 @@ bool _Thread_Start( Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, - Thread_Entry_numeric_type numeric_argument + Thread_Entry_numeric_type numeric_argument, + Per_CPU_Control *processor ) { if ( _States_Is_dormant( the_thread->current_state ) ) { @@ -51,7 +52,12 @@ bool _Thread_Start( _Thread_Load_environment( the_thread ); - _Thread_Ready( the_thread ); + if ( processor == NULL ) { + _Thread_Ready( the_thread ); + } else { + the_thread->current_state = STATES_READY; + _Scheduler_Start_idle( the_thread, processor ); + } _User_extensions_Thread_start( the_thread ); |