From d8f3f65be0c1613e150f3c3c57378dd70be28445 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 12 Nov 1999 21:23:34 +0000 Subject: + Changed validation of the_thread to validation of location. + Modified correct return path to call _ITRON_return_errorno( E_OK ) instead of enabling dispatching and returning E_OK. --- c/src/exec/itron/src/ter_tsk.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'c/src/exec/itron/src/ter_tsk.c') diff --git a/c/src/exec/itron/src/ter_tsk.c b/c/src/exec/itron/src/ter_tsk.c index 070cfcee25..e620338669 100644 --- a/c/src/exec/itron/src/ter_tsk.c +++ b/c/src/exec/itron/src/ter_tsk.c @@ -30,10 +30,10 @@ ER ter_tsk( the_thread = _ITRON_Task_Get( tskid, &location ); - if ( !the_thread ) + if ( location != OBJECTS_LOCAL ) _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) ); - if ( the_thread == _Thread_Executing ) + if ( _Thread_Is_executing( the_thread ) ) _ITRON_return_errorno( E_OBJ ); if ( _States_Is_dormant( the_thread->current_state ) ) @@ -42,8 +42,7 @@ ER ter_tsk( _Thread_Restart( the_thread, NULL, 0 ); _Thread_Set_state( the_thread, STATES_DORMANT ); - _Thread_Enable_dispatch(); - return E_OK; + _ITRON_return_errorno( E_OK ); } -- cgit v1.2.3