summaryrefslogtreecommitdiffstats
path: root/c/src/exec/itron
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-12 21:21:09 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-12 21:21:09 +0000
commit2979c288bb9433141d0ecca9f1ff0ed13b82e3df (patch)
tree4948c5f28cfbe8ff45db598a60a92678381ced28 /c/src/exec/itron
parent+ Changed validation of the_thread to validation of location. (diff)
downloadrtems-2979c288bb9433141d0ecca9f1ff0ed13b82e3df.tar.bz2
+ Changed validation of the_thread to validation of location.
+ Removed error path that should never happen.
Diffstat (limited to 'c/src/exec/itron')
-rw-r--r--c/src/exec/itron/src/sta_tsk.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/c/src/exec/itron/src/sta_tsk.c b/c/src/exec/itron/src/sta_tsk.c
index 73cc49e36b..83592edf9a 100644
--- a/c/src/exec/itron/src/sta_tsk.c
+++ b/c/src/exec/itron/src/sta_tsk.c
@@ -31,18 +31,16 @@ ER sta_tsk(
boolean status;
the_thread = _ITRON_Task_Get( tskid, &location );
- if (!the_thread)
- _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
-
- if ( !_States_Is_dormant( the_thread->current_state ) )
- _ITRON_return_errorno( E_OBJ );
-
switch ( location ) {
case OBJECTS_REMOTE:
case OBJECTS_ERROR:
_ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
case OBJECTS_LOCAL:
+
+ if ( !_States_Is_dormant( the_thread->current_state ) )
+ _ITRON_return_errorno( E_OBJ );
+
status = _Thread_Start(
the_thread,
THREAD_START_NUMERIC, /* XXX should be able to say we have no arg */
@@ -51,14 +49,16 @@ ER sta_tsk(
0 /* unused */
);
- if ( !status )
- _ITRON_return_errorno( E_OBJ );
+ /*
+ * This error can not happen entry_point is checked in create.
+ if ( !status )
+ _ITRON_return_errorno( E_OBJ );
+ */
- _Thread_Enable_dispatch();
- return E_OK;
+ _ITRON_return_errorno( E_OK );
}
- return E_OBJ; /* unreached - only to remove warnings */
+ _ITRON_return_errorno( E_OBJ ); /* unreached - only to remove warnings */
}