ext_tsk

Outline

Terminate invoking task.

C format

 void    ext_tsk ( void );


Assembly format

 BR      !!_ext_tsk


Parameter(s)

None.

Explanation

This service call moves an invoking task from the RUNNING state to the DORMANT state.

As a result, the invoking task is unlinked from the ready queue and excluded from the RI78V4 scheduling subject.

If an activation request has been queued to the invoking task (the activation request counter is not set to 0x0) when this service call is issued, this service call moves the task from the RUNNING state to the DORMANT state, decrements the wakeup request counter (by subtracting 0x1 from the wakeup request counter), and then moves the task from the DORMANT state to the READY state.

Note 1 This service call does not return the OS resource that the invoking task acquired by issuing a service call such as sig_sem or get_mpf. The OS resource have been acquired must therefore be returned before issuing this service call.

Note 2 When moving a task from the RUNNING state to the DORMANT state, this service call initializes the following information to values that are set during task creation.

- Priority (current priority)

- Wakeup request count

- Suspension count

- Interrupt status

Note 3 If the return instruction is written in a task, it executes the same operation as this service call.

Note 4 In the RI78V4, code efficiency is enhanced by coding the return instruction as a "Terminate invoking task".

Return value

None.