gtpi1m0nSystem Installation Support Reference

C Stack Exception (TARGET(TPF))

The user exit (UCCCSK) for the C stack exception routine is used with C language support and is activated the first time a C program is called during the life of an entry.

Some possible uses of this exit point include:

Exit point CSK in CSECT CCLANG. When the user exit is activated, control is transferred to the CUSR copy member of CCUEXT.

General Conditions at Entry

The registers at entry to UCCCSK are:

R1
Current block pointer.

R4
Address of next C stack frame (CSTKNAB).

R5
Address of default locale name.

R6
Requested C stack frame size.

R7
Address of first C stack frame in first block.

R8
Program base register.

R9
Address of the ECB.

R11-R15
See User Exit Routines - Common Entry Conditions.

System Conditions at Entry

System state
Supervisor

System mask
Unmasked

Protect key
0

Address space
EVM.

Programming Considerations at Entry

  1. If you want to add additional space at the end of the first stack frame, this space must be added immediately following the CSTKEND field. The length of this additional space must be added to both CSTKNAB and R4 (the new frame pointer), which hold the same value. The maximum size of the stack frame is 4095 bytes, minus the size of the block header. For detailed information about the layout of the stack frame, see data macro ICS0TK.
  2. The current locale name (the default) is pointed to by R5. If a different locale is needed, store the name of the locale (4-byte maximum) at the location pointed to by R5. Characters EDC$ at the beginning of each locale name are not stored. For example, for locale EDC$UK, store UK at the address pointed to by R5, and pad this value on the right with nulls.
  3. See User Exit Routines - Common Programming Considerations for other considerations.

Programming Considerations on Return

All registers must be restored before return, with the following exception. If the size of the first stack frame is expanded because of the addition of a user expansion area, then R4 is updated to point to the next stack frame.

General Conditions on Return

See User Exit Routines - Common Return Conditions, except for R4, as discussed previously.