Download RI78V4 Real-Time Operating System User`s Manual: Coding

Transcript
RI78V4 V2.00.00
CHAPTER 8 SYSTEM STATE MANAGEMENT FUNCTIONS
CHAPTER 8
SYSTEM STATE MANAGEMENT FUNCTIONS
This chapter describes the system state management functions performed by the RI78V4.
8.1
Outline
The system state control functions of the RI78V4 include, in addition to functions to manipulate the state of the system,
such as transition to the CPU locked state and transition to the dispatching disabled state, functions for referencing the
state of the system, such as context type referencing and CPU locked state referencing.
8.2
Rotate Task Precedence
A ready queue is rotated by issuing the following service call from the processing program.
- rot_rdq, irot_rdq
This service call re-queues the first task of the ready queue corresponding to the priority specified by parameter tskpri
to the end of the queue to change the task execution order explicitly.
The following shows the status transition when this service call is used.
Figure 8-1
Rotate Task Precedence
Ready queue
Invoking task
RUNNING state
1
Task A
READY state
tskpri
Task B
READY state
Task C
READY state
Task C
READY state
Task A
READY state
maxtpri
rot_rdq ( tskpri );
Ready queue
1
tskpri
Invoking task
RUNNING state
Task B
READY state
maxtpri
R20UT3375EJ0100 Rev.1.00
2015.03.25
Page 97 of 309