- 23 -
♦
A currently executed task has placed itself in the WAITING state.
♦
A currently executed task has changed its own priority by chg_pri or ichg_pri service call so that
the priority of a different READY task is rendered higher.
♦
Due to interruption or other event occurrence, the priority of a currently executed task has been
changed so that the priority of a different 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
3. WAITING
state
When a task in the RUNNING state requests to be placed in the WAITING state, it exits the RUNNING state and
enters the WAITING state. The WAITING state is usually used as the condition in which the completion of I/O
device I/O operation or the processing of some other task is awaited.
The task goes into the WAITING state in one of the following ways.
♦
The task enters the WAITING state simply when the slp_tsk service call is issued. In this case, the
task does not go into the READY state until its WAITING state is cleared explicitly by some other
task.
♦
The task enters and remains in the WAITING state for a specified time period when the dly_tsk
service call is issued. In this case, the task goes into the READY state when the specified time has
elapsed or its WAITING state is cleared explicitly by some other task.
♦
The task is placed into WAITING state for a wait request by the wai_flg, wai_sem, rcv_mbx,
snd_dtq, rcv_dtq, vsnd_dtq, vrcv_dtq, or get_mpf service call. In this case, the task goes from
WAITING state to READY state when the request is met or WAITING state is explicitly canceled
by another task.
♦
The tslp_tsk, twai_flg, twai_sem, trcv_mbx, tsnd_dtq, trcv_dtq, vtsnd_dtq, vtrcv_dtq and tget_mpf
service calls are the timeout-specified versions of the slp_tsk, wai_flg, wai_sem, rcv_mbx, snd_dtq,
rcv_dtq, vsnd_dtq, vrcv_dtq and get_mpf service calls. The task is placed into WAITING state for a
wait request by one of these service calls. In this case, the task goes from WAITING state to
READY state when the request is met or the specified time has elapsed.
♦
If the task is placed into WAITING state for a wait request by the wai_flg, wai_sem, rcv_mbx,
snd_dtq, rcv_dtq, vsnd_dtq, vrcv_dtq, get_mpf, twai_flg, twai_sem, trcv_mbx, tsnd_dtq, trcv_dtq,
vtsnd_dtq, vtrcv_dtq and tget_mpf service call, the task is queued to one of the following waiting
queues depending on the request.
z
Event flag waiting queue
z
Semaphore waiting queue
z
Mailbox message reception waiting queue
z
Data queue data transmission waiting queue
z
Data queue data reception waiting queue
z
Short data queue data transmission waiting queue
z
Short data queue data reception waiting queue
z
Fixed-size memory pool acquisition waiting queue
4. SUSPENDED
state
When the sus_tsk service call is issued from a task in the RUNNING state or the isus_tsk service call is issued
from a handler, the READY task designated by the service call or the currently executed task enters the SUS-
PENDED state. If a task in the WAITING state is placed in this situation, it goes into the WAIT-
ING-SUSPENDED state.
The SUSPENDED state is the condition in which a READY task or currently executed task
is excluded from
scheduling to halt processing due to I/O or other error occurrence. That is, when the suspend request is made to a
READY task, that task is excluded from the execution queue.
Note that no queue is formed for the suspend request. Therefore, the suspend request can only be made to the
10
Depends on the 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,tget_mpf, get_mpf and vrcv_dtq service call.
11
If the task under execution is placed into a forcible wait state by the isus_tsk service call from the handler, the task goes from an execut-
ing state directly to a forcible wait state. Please note that in only this case exceptionally, it is possible that a task will go from an executing
state directly to a forcible wait state.