Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (S)
Guardian Procedure Calls Reference Manual—522629-013
14-156
SIGSETJMP_ Procedure
< > 0D indicates that SIGSETJMP_ is returning as a result of a call to the
SIGLONGJMP_ procedure. The returned value is specified by
SIGLONGJMP_.
env output
INT .EXT:ref:(SIGJMP_BUF_TEMPLATE)
indicates the address of a previously allocated jump buffer in which the process
context of the caller is returned. The jump buffer is allocated by the
SIGJMP_BUF_DEF DEFINE.
mask input
INT(32):value
specifies whether the current signal mask is also saved in the jump buffer indicated
by
env:
0D specifies that the current signal mask is not to be saved.
< > 0D specifies that the current signal mask is to be saved. This mask is
reinstated by a corresponding call to the SIGLONGJMP_ procedure.
Considerations
•
SIGSETJMP_ is the TAL or pTAL procedure name for the C sigsetjmp()
function. The C
sigsetjmp() function conforms to the POSIX.1 standard.
•
You can allocate the jump buffer for SIGSETJMP_ using the SIGJMP_BUF_DEF
DEFINE as follows:
SIGJMP_BUF_DEF ( env );
where env is a legal variable name.
Alternatively, you can allocate the buffer by declaring a structure if type
SIGJMP_BUF_TEMPLATE.
In either case, the buffer must be accessible to both the SIGSETJMP_ procedure
call and the associated SIGLONGJMP_ procedure call.
•
The jump buffer saved by the SIGSETJMP_ procedure is normally used by a call
to the SIGLONGJMP_ procedure. The jump buffer can be used by a call to the
LONGJMP_ procedure only if the signal mask is not saved.
•
The buffer pointer is assumed to be valid. An illegal address passed to
SISETJMP_ will cause unpredictable results and could cause the system to deliver
a nondeferrable signal to the process.
•
Do not change the contents of the jump buffer. The results of a corresponding
SIGLONGJMP_ call are undefined if the contents of the jump buffer are changed.