summaryrefslogtreecommitdiffstats
path: root/cpukit/itron
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-12 21:18:36 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-12 21:18:36 +0000
commit037a7b16a122a8076b914ea846d5f46488388904 (patch)
tree4798e9c792282136a61a4b83876630f1662500b2 /cpukit/itron
parentAdded comment about the E_CTX error condition (Implementation dependent). (diff)
downloadrtems-037a7b16a122a8076b914ea846d5f46488388904.tar.bz2
+ Moved error checks to before the disable dispatch where possible.
Diffstat (limited to 'cpukit/itron')
-rw-r--r--cpukit/itron/src/ref_tsk.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cpukit/itron/src/ref_tsk.c b/cpukit/itron/src/ref_tsk.c
index 2c6ad11709..eee348412b 100644
--- a/cpukit/itron/src/ref_tsk.c
+++ b/cpukit/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 );
}