summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/taskrestart.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/rtems/src/taskrestart.c')
-rw-r--r--cpukit/rtems/src/taskrestart.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/cpukit/rtems/src/taskrestart.c b/cpukit/rtems/src/taskrestart.c
index daac0da0c7..ad446421f9 100644
--- a/cpukit/rtems/src/taskrestart.c
+++ b/cpukit/rtems/src/taskrestart.c
@@ -34,15 +34,7 @@ rtems_status_code rtems_task_restart(
case OBJECTS_LOCAL:
if ( _Thread_Restart( the_thread, NULL, argument ) ) {
- if ( _Thread_Is_executing( the_thread ) ) {
- _Objects_Put_and_keep_thread_dispatch_disabled(
- &the_thread->Object
- );
- _Thread_Restart_self();
- } else {
- _Objects_Put( &the_thread->Object );
- }
-
+ _Objects_Put( &the_thread->Object );
return RTEMS_SUCCESSFUL;
}
_Objects_Put( &the_thread->Object );