Any values of the request and delay which have been set are returned to the calling routine (DTASK_OBEY or DTASK_CANCEL by DTASK_APPLIC and DTASK_ACT_SCHED is called to check if a reschedule is required and set it up if required.
Reschedule requests may be:
As each reschedule is set, the action sequence number, initially 0, is incremented.
Where a timeout is required, an ATIMER timer is set by:
CALL DTASK_RESCHED( ACTPTR, ACTCNT, SCHEDTIME, STATUS )
ACTPTR specifies the action to be rescheduled, and ACTCT the timer identifier. The timer is set to call DTASK_CHDLR() after SCHEDTIME millisecs. DTASK_CHDLR() is written in C and is a straight-through call to DTASK_ASTHDLR() which calls AMS_RESMSG() to send a reschedule message (message status MESSYS__RESCHED) to this task.
When DTASK_DTASK() receives the reschedule message, it calls DTASK_TIMEOUT() which de-constructs the passed value into an action pointer and count, and checks that the specified action reschedule was expected.
If that checks OK, the action is obeyed (DTASK_OBEY()); if not, it is ignored.
ADAM The Control Subsystem