3 regarding delay dispatching – Renesas Emulator System M3T-MR100 User Manual

Page 292

Advertising
background image

- 276 -

11.3 Regarding Delay Dispatching

MR100 has four service calls related to delay dispatching.

dis_dsp

ena_dsp

loc_cpu

unl_cpu

The following describes task handling when dispatch is temporarily delayed by using these service calls.

14. When the execution task in delay dispatching should be preempted

While dispatch is disabled, even under conditions where the task under execution should be preempted, no time
is dispatched to new tasks that are in an executable state. Dispatching to the tasks to be executed is delayed until
the dispatch disabled state is cleared. When dispatch is being delayed.

Task under execution is in a RUN state and is linked to the ready queue

Task to be executed after the dispatch disabled state is cleared is in a READY state and is linked to the
highest priority ready queue (among the queued tasks).

15. isus_tsk,irsm_tsk during dispatch delay

In cases when isus_tsk is issued from an interrupt handler that has been invoked in a dispatch disabled state to
the task under execution (a task to which dis_dsp was issued) to place it in a SUSPEND state. During delay dis-
patching.

The task under execution is handled inside the OS as having had its delay dispatching cleared. For this
reason, in isus_tsk that has been issued to the task under execution, the task is removed from the
ready queue and placed in a SUSPEND state. Error code E_OK is returned. Then, when irsm_tsk is
issued to the task under execution, the task is linked to the ready queue and error code E_OK is re-
turned. However, tasks are not switched over until delay dispatching is cleared.

The task to be executed after disabled dispatching is re-enabled is linked to the ready queue.

16. rot_rdq, irot_rdq during dispatch delay

When rot_rdq (TPRI_RUN = 0) is issued during dispatch delay, the ready queue of the own task's priority is ro-
tated. Also, when irot_rdq (TPRI_RUN = 0) is issued, the ready queue of the executed task's priority is rotated.
In this case, the task under execution may not always be linked to the ready queue. (Such as when isus_tsk is is-
sued to the executed task during dispatch delay.)

17. Precautions

No service call (e.g., slp_tsk, wai_sem) can be issued that may place the own task in a wait state while
in a state where dispatch is disabled by dis_dsp or loc_cpu.

ena_dsp and dis_dsp cannot be issued while in a state where interrupts and dispatch are disabled by
loc_cpu.

Disabled dispatch is re-enabled by issuing ena_dsp once after issuing dis_dsp several times.

The above status transition can be summarized in Table 3.3.

Advertising