Everything

ter_tsk

Outline
Terminate task.
C format
 ER      ter_tsk (ID tskid);
Parameter(s)
I/O
Parameter
Description
I
 ID      tskid;
ID number of the task.

Explanation
This service call forcibly moves the task specified by parameter tskid to the DORMANT state.
As a result, the target task is excluded from the RI600V4 scheduling subject.
At this time, processing described in Table 18-3 is done.
If an activation request has been queued to the target task (the activation request counter > 0) when this service call is issued, this service call moves the task to the DORMANT state, decrements the activation request counter (by subtracting 1 from the activation request counter), and then moves the task from the DORMANT state to the READY state. At this time, processing described in Table 18-2 is done.
Note This service call does not have the function to automatically free the resources except the mutex hitherto occupied by the task (e.g., semaphores and memory blocks). Make sure the task frees these resources before it terminates
Return value
Macro
Value
Description
E_OK
0
Normal completion.
E_ID
-18
Invalid ID number.
- tskid < 0
- tskid > VTMAX_TSK
E_CTX
-25
Context error.
- This service call was issued in the CPU locked state.
- This service call was issued from non-task.
- This service call was issued in the status "PSW.IPL > kernel interrupt mask level".
E_ILUSE
-28
Illegal service call use.
- Specified task is the invoking task.
E_OBJ
-41
Object state error.
- Specified task is in the DORMANT state.