beautypg.com

Renesas Emulator System M3T-MR100 User Manual

Page 38

background image

- 22 -

Forced
termination
request
from other

task

SUSPENDED state clear
request from other task

SUSPEND request
from other task

READY state

RUNNING state

WAITING state

WAITING-SUSPENDED

state

DORMANT

state

SUSPENDED

state

WAITING

state

clear

t

SUSPEND request
from other task

SUSPENDED state
clear request

MPU execlusive right relinquishment

MPU execlusive right acquisition

Entering the
WAITING state

Task activation

Forced termination
request from other task


WAITING state

l

Figure 3.16 MR100 Task Status Transition

1. RUNNING

state

In this state, the task is being executed. Since only one microcomputer is used, it is natural that only one task is
being executed.
The currently executed task changes into a different state when any of the following conditions occurs.

♦ The task has normally terminated itself by ext_tsk service call.

♦ The task has placed itself in the WAITING.

9

♦ Since the service call was issued from the RUNNING state task, the WAITING state of another

task with a priority higher than the RUNNING state task is cleared.

♦ Due to interruption or other event occurrence, the interrupt handler has placed a different task

having a higher priority in the READY state.

♦ The priority assigned to the task has been changed by chg_pri or ichg_pri service call so that the

priority of another READY task is rendered higher.

♦ When the ready queue of the issuing task priority is rotated by the rot_rdq or irot_rdq service call

and control of execution is thereby abandoned

When any of the above conditions occurs, rescheduling takes place so that the task having the highest priority
among those in the RUNNING or READY state is placed in the RUNNING state, and the execution of that task
starts.

2. READY

state

The READY state refers to the situation in which the task that meets the task execution conditions is still waiting
for execution because a different task having a higher priority is currently being executed.
When any of the following conditions occurs, the READY task that can be executed second according to the
ready queue

is placed in the RUNNING state.

♦ A currently executed task has normally terminated itself by ext_tsk service call.

9

By issuing dly_tsk, slp_tsk, tslp_tsk, wai_flg, twai_flg, wai_sem, twai_sem, rcv_mbx, trcv_mbx,snd_dtq,tsnd_dtq,rcv_dtq, trcv_dtq,

vtsnd_dtq, vsnd_dtq,vtrcv_dtq,vrcv_dtq, get_mpf, and tget_mpf service call.