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.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/cpukit/rtems/src/taskrestart.c b/cpukit/rtems/src/taskrestart.c
index d374d43fc4..61d14b3dc1 100644
--- a/cpukit/rtems/src/taskrestart.c
+++ b/cpukit/rtems/src/taskrestart.c
@@ -61,15 +61,6 @@ rtems_status_code rtems_task_restart(
the_thread = _Thread_Get( id, &location );
switch ( location ) {
-#if defined(RTEMS_MULTIPROCESSING)
- case OBJECTS_REMOTE:
- _Thread_Dispatch();
- return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
case OBJECTS_LOCAL:
if ( _Thread_Restart( the_thread, NULL, argument ) ) {
_Thread_Enable_dispatch();
@@ -77,7 +68,16 @@ rtems_status_code rtems_task_restart(
}
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
+
+#if defined(RTEMS_MULTIPROCESSING)
+ case OBJECTS_REMOTE:
+ _Thread_Dispatch();
+ return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
+#endif
+
+ case OBJECTS_ERROR:
+ break;
}
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
+ return RTEMS_INVALID_ID;
}