DIE execution

Must be like the execution of an interrupt handler. Specifically, the DIE routine executes under the following restrictions:
  • The DIE must be capable of executing in any address space because the timer interruption may occur while any address space enabled for external interruptions is executing.
  • The DIE may not reference any private storage areas.
  • The DIE may not use ALET=2 in AR ASC mode.
  • The DIE must execute disabled. Hence, it may not cause a page fault.
  • The DIE may not request a local lock or the CMS lock because these are suspend locks and might therefore already be in use. Furthermore, the DIE routine may not assume whether or not these locks are held upon entry.
  • The DIE may not execute any SVCs.

The DIE routine may re-enqueue the TQE to set another real time interval by using the timer's TQE ENQUEUE routine (whose entry point is in CVT field CVTQTE00). The DIE routine must issue SETLOCK OBTAIN,TYPE=DISP,MODE=UNCOND upon entry to the TQE ENQUEUE routine.

The input environment for the TQE ENQUEUE routine must be as follows:
  • Supervisor state, key zero.
  • Register 1 must contain the address of the TQE supplied to the DIE routine. Only the following TQE fields can be changed.

    TQEVAL -- This field should contain the clock comparator value for the next interruption. This value is equivalent to the desired interval added to the value in TQEVAL when the DIE routine was entered. Alternatively, TQEVAL can be calculated by adding the desired interval to the current TOD clock reading (as obtained by a STCK instruction). The choice of which method to use is further discussed under “Clock Failure”.

    TQEAMODE bit -- set to 1 to indicate that the address of the user's DIE in TQEEXIT is pointer defined.

    TQEEXIT -- This field should contain the new address if a DIE routine address different from the current one is desired. Otherwise the field should remain unchanged. If the TQEAMODE bit is set to 1, the high-order bit of this field, TQEXMODE, must indicate the addressing mode of the user's DIE. If the user's DIE is to execute in 24-bit addressing mode, TQEXMODE=0; if the user's DIE is to execute in 31-bit addressing mode, TQEXMODE=1.

    TQEDREGS -- If the parameter values in the low halves of registers 2 - 12 are to be changed for the subsequent DIE routine entry, the new values should be set in this 11-word field.

  • Register 2 must contain the caller's return address.

Upon return from the TQE ENQUEUE routine, all registers are as they were on entry except for registers 13 and 15. The DIE routine must issue SETLOCK RELEASE,TYPE=DISP.

Although the set DIE function is similar to the TQE ENQUEUE function, the routines differ in the following respects:
  • Although TQE ENQUEUE expects an already established and fully initialized TQE as input, the set DIE service routine completes the user-supplied TQE to make it acceptable to timer supervision.
  • For TQE ENQUEUE, TQEVAL in the TQE must be set to the clock comparator value for the next interruption. With the set DIE service routine, it must be set to the desired interval. The set DIE service routine then converts it to the proper clock comparator value.
  • TQE ENQUEUE assumes that the clocks are functioning correctly. The set DIE service routine must use the clocks directly and therefore verifies (rather than assumes) that the clocks are functioning correctly. The set DIE service routine is therefore capable of advantageously using alternate clocks in a multiprocessing environment in which one or more clocks have failed.