From 037a7b16a122a8076b914ea846d5f46488388904 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 12 Nov 1999 21:18:36 +0000 Subject: + Moved error checks to before the disable dispatch where possible. --- c/src/exec/itron/src/ref_tsk.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'c/src/exec') diff --git a/c/src/exec/itron/src/ref_tsk.c b/c/src/exec/itron/src/ref_tsk.c index 2c6ad11709..eee348412b 100644 --- a/c/src/exec/itron/src/ref_tsk.c +++ b/c/src/exec/itron/src/ref_tsk.c @@ -30,13 +30,13 @@ ER ref_tsk( Objects_Locations location; Priority_Control core_priority; + if (!pk_rtsk) + return E_PAR; + 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 (!pk_rtsk) - _ITRON_return_errorno( E_PAR ); - /* * The following are extended functions [level X ]. * XXX - tskwait, wid, wupcnt, and tskatr are presently not implemented. @@ -76,7 +76,7 @@ ER ref_tsk( if ((the_thread->current_state & STATES_BLOCKED) != 0) pk_rtsk->tskstat = TTS_WAI; - return E_OK; /* XXX - Should never get here */ + _ITRON_return_errorno( E_OK ); } -- cgit v1.2.3