-
rot_rdq
irot_rdq
-
ER rot_rdq ( PRI tskpri );
ER irot_rdq ( PRI tskpri );
|
MOV A, #tskpri
CALL !!_rot_rdq
MOV A, #tskpri
CALL !!_irot_rdq
|
|
|
|
|
PRI tskpri;
|
Priority of the tasks whose precedence is rotated.
TPRI_SELF: Current priority of the invoking task.
Value: Priority of the tasks whose precedence is rotated.
|
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.
Note 1 This service call does not perform queuing of rotation requests. If no task is queued to the ready queue corresponding to the relevant priority, therefore, no processing is performed but it is not handled as an error.
Note 2 Round-robin scheduling can be implemented by issuing this service call via a cyclic handler in a constant cycle.
Note 3 The ready queue is a hash table that uses priority as the key, and tasks that have entered an executable state (READY state or RUNNING state) are queued in FIFO order.
Therefore, the scheduler realizes the RI78V4's
Scheduling System by executing task detection processing from the highest priority level of the ready queue upon activation, and upon detection of queued tasks, giving the CPU use right to the first task of the proper priority level.