Use this system macro to set the maximum times that an application can
avoid a timeout between loss of control for the specified entry control block
(ECB).
Format
- label
- A symbolic name can be assigned to the macro statement.
- ECB=Rx
- The system virtual address (SVA) of the target ECB that is to avoid
application timeout. The SVA is specified in a register in the range R0
through R6.
- AVOIDT=Ry
- The maximum times the application is to avoid timeout. This is in
addition to the one time for the standard system timeout. The value is
specified in a register in the range R0 through R6.
The value acts as a multiplier of the standard system timeout value.
Specify a value of 0-32766.
A value of 0 means the ECB will use the standard application
timeout.
Entry Requirements
- C-type programs must be in key 0 and supervisor state when processing this
macro, and R13 must point to a valid system stack area.
- For E-type programs, R9 must contain the ECB virtual address (EVA)
of the ECB issuing the macro.
Return Conditions
- Control is returned to the next sequential instruction (NSI).
- Return codes in R15:
- If no error occurs, R15 contains zero, and the timeout for this ECB is
changed.
- If an error occurs, an error indication code is returned in R15, and the
timeout is not changed. Control is returned to the caller after the
first error is found.
- For E-type programs, the contents of R10 and R14 are unknown.
- The contents of all other registers are preserved across this macro
call.
- The following tags are generated by the SETOC macro and should be used for
interrogating the error indication code returned in R15.
- IT_SETOC_BAD_ECB_ERR
- The address in the ECB parameter register is not a valid system virtual
address (SVA) ECB address. The timeout for the ECB is not
changed.
- IT_SETOC_BAD_AVOIDT_ERR
- The value in the AVOIDT parameter register is a negative number or a
number greater than 32766. The timeout for the ECB is not
changed.
Programming Considerations
- The contents of the AVOIDT parameter register acts as a multiplier of the
standard system timeout value.
For example, if the standard system timeout value is 500 milliseconds, a
value of 3 causes the ECB to wait 3 times in addition to the 1 time for the
standard system application timeout. The ECB will wait ((3 times 500)
plus (1 times 500)), or 2000 milliseconds, before timing out.
- Specify the minimum AVOIDT value needed. A large value can cause
system performance problems or lockout problems.
- The ECB issuing the SETOC macro must be on the same I-stream as the target
ECB, or the ECB should pause the TPF system before issuing the SETOC macro on
behalf of another ECB.
- You can use the ZCTKA command to change the value in keypoint A for the
number of times to avoid an application timeout. TPF system code can
use the contents of the CINFC CMMAVMAX field for the contents of the SETOC
macro AVOIDT parameter register when issuing the SETOC macro.
- The SETOC macro does not affect the CTL-2010 time slice timeout.
- The APL user exit is provided for you to issue the SETOC macro to set the
maximum times to avoid timeout for an ECB right before the ECB is about to be
timed out with a CTL-10.
- The C function trace CDEB, CEXP, and CTRC user exits are provided for you
to issue the SETOC macro to set the maximum timeout value for ISO-C programs
that have been compiled using the TEST compiler option of one of the IBM
C/370 family of compilers supported by the TPF 4.1 system.
- The SETOC macro sets R15 with a return code. If the SETOC macro is
used in the CDEB, CEXP, CTRC, or APL user exits, a base register other than
R15 should be established for addressability.
Examples
In the following examples, the standard application timeout value is
assumed to be 500 milliseconds. For E-type programs, R9 must
contain the ECB virtual address (EVA) of the ECB issuing the macro.
- AVOIDT parameter register contents of 2:
(R6 contains the SVM address of an active ECB in the TPF system)
LA R3,2
SETOC ECB=R6,AVOIDT=R3
This invocation:
- Changes the timeout for the ECB whose SVA is contained in register
6. The ECB will wait 2 times the standard timeout in addition to the 1
time for the standard timeout. The number of milliseconds the ECB will
wait before timing out is
- ((2 times 500) plus (1 times 500)), or 1500 milliseconds.
- AVOIDT parameter register contents of 32767:
(R6 contains the SVM address of an active ECB in the TPF system)
LA R3,=X'00007FFF' VALUE IS 32767
SETOC ECB=R6,AVOIDT=R3
This invocation causes an error condition to be returned in R15 because an
AVOIDT value greater than 32766 is an error condition. The timeout is
not changed.
- AVOIDT parameter register contents of 0:
(R6 contains the SVM address of an active ECB in the TPF system)
LA R3,0
SETOC ECB=R6,AVOIDT=R3
This invocation resets the timeout to the standard application timeout for
the ECB whose SVA is contained in register 6. If the standard
application timeout is 500 milliseconds, the ECB will wait 500 milliseconds
before timing out.