The executing thread will be later used for a common implementation with _Thread_Close(). --- cpukit/rtems/src/taskrestart.c | 2 +- cpukit/score/include/rtems/score/threadimpl.h | 10 +--------- cpukit/score/src/threadrestart.c | 11 +++++++++-- 3 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/cpukit/rtems/src/taskrestart.c b/cpukit/rtems/src/taskrestart.c index ad44642..0b56ed5 100644 --- a/cpukit/rtems/src/taskrestart.c +++ b/cpukit/rtems/src/taskrestart.c @@ -33,7 +33,7 @@ rtems_status_code rtems_task_restart( switch ( location ) { case OBJECTS_LOCAL: - if ( _Thread_Restart( the_thread, NULL, argument ) ) { + if ( _Thread_Restart( the_thread, _Thread_Executing, NULL, argument ) ) { _Objects_Put( &the_thread->Object ); return RTEMS_SUCCESSFUL; } diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h index 57eb856..2e31753 100644 --- a/cpukit/score/include/rtems/score/threadimpl.h +++ b/cpukit/score/include/rtems/score/threadimpl.h @@ -187,17 +187,9 @@ bool _Thread_Start( Per_CPU_Control *processor ); -/** - * @brief Restarts the specified thread. - * - * This support routine restarts the specified task in a way that the - * next time this thread executes, it will begin execution at its - * original starting point. - * - * TODO: multiple task arg profiles - */ bool _Thread_Restart( Thread_Control *the_thread, + Thread_Control *executing, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ); diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c index a0416b8..193c6ab 100644 --- a/cpukit/score/src/threadrestart.c +++ b/cpukit/score/src/threadrestart.c @@ -60,7 +60,10 @@ static void _Thread_Reset( Thread_Control *the_thread ) } } -static void _Thread_Request_life_change( Thread_Control *the_thread ) +static void _Thread_Request_life_change( + Thread_Control *the_thread, + Thread_Control *executing +) { _Thread_Set_transient( the_thread ); @@ -75,6 +78,7 @@ static void _Thread_Request_life_change( Thread_Control *the_thread ) bool _Thread_Restart( Thread_Control *the_thread, + Thread_Control *executing, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) @@ -83,7 +87,10 @@ bool _Thread_Restart( the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; - _Thread_Request_life_change( the_thread ); + _Thread_Request_life_change( + the_thread, + executing + ); return true; } -- 1.7.7 _______________________________________________ rtems-devel mailing list rtems-devel@rtems.org http://www.rtems.org/mailman/listinfo/rtems-devel