summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c/src/exec/itron/src/ref_tsk.c10
-rw-r--r--cpukit/itron/src/ref_tsk.c10
2 files changed, 10 insertions, 10 deletions
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 );
}
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 );
}