RTEMS Logo

RTEMS 4.8.0 On-Line Library


Task Manager rot_rdq - Rotate Tasks on the Ready Queue

PREV UP NEXT Bookshelf RTEMS ITRON 3.0 API User's Guide

1.4.10: rot_rdq - Rotate Tasks on the Ready Queue

CALLING SEQUENCE:

ER rot_rdq(
  PRI tskpri
);

STATUS CODES:

E_OK - Normal Completion

E_PAR - Parameter error (the value of tskpri is invalid)

DESCRIPTION:

This system call rotates tasks on the ready queue associated with the priority level specified by tskpri. Specifically, the task at the head of the ready queue of the priority level in question is moved to the end of the ready queue, thus switching the execution of tasks having the same priority. Round robin scheduling may be implemented by periodically issuing this system call in a given period of time.

When rot_rdq is issued by task portions with tskpri = TPRI_RUN = 0, the ready queue with the priority level of the issuing task is rotated.

When TPRI_RUN or a task's own priority level are specified for tskpri to rot_rdq, the task issuing the system call will be placed on the end of its ready queue. In other words, task can issue rot_rdq to relinquishing its execution privileges. The concept of "ready queue" envisioned in the description of this system call is one which includes the task in RUN state.

This system call does nothing if there are no tasks on the ready queue of the specified priority. No error will result.

This system call cannot rotate ready queues on other nodes.

NOTES:

Depending on the implementation, it may be possible to issue rot_rdq(tskpri = TPRI_RUN) from task-independent portions, such as a cyclic handler. In this case the ready queue including the running task, or the ready queue including the highest priority task, is rotated. Normally these two are the same, but not always, as when task dispatching is delayed. In that case it is implementation dependent whether to rotate the ready queue including the running task or the ready queue including the highest priority task. Note that this is an extended function [Level X] for which compatibility and connectivity are not guaranteed.


PREV UP NEXT Bookshelf RTEMS ITRON 3.0 API User's Guide

Copyright © 1988-2007OAR Corporation