ter_tsk
ER ter_tsk (ID tskid);
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 19-3 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