Type 6 SVC routines

You must define your user-written SVC routine as being one of the five valid types, including type 6. The type 6 SVC routine performs functions similar to the type 1 SVC routine. However, the type 6 routine offers performance advantages over the type 1. The type 6 SVC routine cannot require the LOCAL lock, as noted later.

The type 6 SVC also provides a more efficient way to change from TCB mode to SRB mode processing. The type 1 SVC must schedule an SRB, which then goes through queuing and dequeuing operations before it is eventually dispatched. The type 6 SVC, however, normally results in immediate scheduling and dispatching of the SRB.

Because a type 6 SVC routine executes under the control of the SVC first level interrupt handler (FLIH), it must preserve disablement and it cannot obtain any locks. When a type 6 SVC routine exits, it always returns to the SVC FLIH. There are three exit options for a type 6 SVC:
  • Return to the caller directly
  • Return to the dispatcher
  • Dispatch an SRB (service request block)

To exit from a type 6 SVC routine, either issue the T6EXIT macro or use the original contents of register 14 as a return address. The use of T6EXIT results in the register conditions described in the following paragraphs.

If a type 6 SVC uses the RETURN=CALLER exit option on the T6EXIT macro, or if it returns by branching on register 14, registers 0, 1, and 15 are returned to the caller. The rest of the caller's registers are unchanged. All of the caller's registers are unchanged if the type 6 SVC uses the RETURN=SRB or DISPATCH exit option on the T6EXIT macro.

If a type 6 SVC uses the RETURN=SRB exit option on the T6EXIT macro, register 1 must point to an SRB. The SRBASCB field must indicate the current address space.

The system neither acquires nor releases any locks for type 6 SVCs. Because a type 6 SVC executes in an MVS-recognized disabled state, it has exclusive use of the processor. Because the type 6 SVC routine runs in disabled state, the routine can only reference data in non-pageable storage. Type 6 SVC routines should be short enough to minimize any adverse effect on performance and they should provide for recovery by using the SETFRR macro.