Overview

A subset of the callable services are now available to SRB mode routines. Supported callable services can be called from SRBs using the same conventions that are used when calling them from task mode routines. However, unlike task mode routines, SRBs do not cause process dubbing on the first issue of a callable service. In order to issue callable services, they must be associated with a dubbed process; that is, the SRB must be running in a dubbed address space. Upon issuing the callable service, it must place into register 2 the address of the OAPB control block that represents the associated process. When the OAPB address in register 2 is zero, the SRB is associated with the initial process in the address space.

Most applications consist of a single process per address space. These applications should default to the initial or only process in the address space, and set register 2 to zero when invoking a callable service. Applications creating multiple processes per address space most likely need to explicitly provide the address of the OAPB of the process to which the SRB is to be associated. In this case, the SRB typically receives the OAPB address from the routine scheduling the SRB. The OAPB address is obtained from the PRLI control block, which contains process-related control information intended for external use. The PRLI is addressed as follows:
TcbStcb -> StcbOtcb -> OtcbThli -> ThliPrli -> PrliOapb

The TCB referenced must represent a thread of the process to which the SRB is to be associated, and the PrliOapb field contains the address that must be passed by the SRB in register 2 when issuing a callable service. Note that the StcbOtcb field is zero until the task has been dubbed. The Otcb, Thli, and Prli are mapped by BPXZOTCB, BPXYTHLI, and BPXYPRLI, respectively.

A restriction on the use of callable services by an SRB is that the SRB must be running in non-cross memory mode (primary=secondary=home).