gtpd1m3cDatabase Reference

Defining Exit Routines

CF support provides the list transition exit routine, which plays a critical role in the operation of the CF list structure. Users provide the address of the exit routine when they issue the CFCONC macro to connect to the CF list structure.

The list transition exit routine informs users when lists they are monitoring change from an empty state to a nonempty state. The affected lists are not identified; this exit routine must issue the CFVCTC macro to determine which lists changed from an empty state to a nonempty state.

Conditions at Entry

System Conditions on Entry

System state
Supervisor

Protect key
0

Address space
System virtual memory (SVM)

Interrupt status
Disabled for external and input/output (I/O) interrupts.

Programming Considerations at Entry

  1. Provide the address of the list transition exit routine using the LISTTRANEXIT parameter when you issue the CFCONC macro to connect to the CF list structure. The exit routine may receive control before control is returned to you from the CFCONC macro. Therefore, ensure that you have the exit routine established along with any control structures that are necessary for completing the processing of the exit routine before issuing the CFCONC macro.

    When the exit routine receives control, it receives information about the request and the outcome in the LEPL. The LEPL is mapped by the ICFLEPL DSECT, which is generated by the ICFPL macro with the LEPL=YES parameter coded.

  2. If you use the list transition exit routine to monitor several lists, be aware that the exit routine is given control whenever any list that you monitor in this way changes from empty state to nonempty state. To determine which monitored list changed its state, issue the CFVTC macro with either the REQUEST=TESTLISTSTATE or REQUEST=LTVECENTRIES parameter coded to check the vector entry for each monitored list.
  3. The time interval involved when detecting and responding to a list transition exit routine introduces several timing considerations, particularly if multiple connections are monitoring the same list:
  4. You can only access the LEPL data area while the list transition exit is running. If you want to save the LEPL information for later processing, make a copy of it before the exit returns.

Conditions on Return

The list transition exit routine must return control to the address that is contained in register 14 (R14) on entry. The contents of all the registers must be restored before returning control to the address in R14. The CEPL and the LEPL includes a 16-fullword save area in which you may choose to save the registers of the caller. In addition, you cannot change the program status word (PSW) or the I/O or external interrupt masks.

Programming Considerations on Return

The list transition exit routine must return to the caller without giving up control.