Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (S)
Guardian Procedure Calls Reference Manual522629-013
14-140
SIGJMP_MASKSET_ Procedure
Use the ERRNO_GET_ procedure to obtain the value of errno in a
Guardian process.
env input,output
INT .EXT:ref:(SIGJMP_BUF_TEMPLATE)
contains the address of a jump buffer containing context saved by the SETJMP_ or
SIGSETJMP_ procedure to be restored by a subsequent call to the
SIGLONGJMP_ procedure.
signal-mask input
INT .EXT:ref:(SIGSET_T)
If not NULL, points to a valid signal mask that is added to the jump buffer indicated
by
env. A subsequent call to the SIGLONGJMP_ procedure restores the context
contained in the jump buffer, including the indicated signal mask.
If NULL, causes the signal mask in the jump buffer indicated by
env to be cleared.
A subsequent call to the SIGLONGJMP_ procedure restores the context contained
in the jump buffer, including the clear signal mask that unblocks all signals.
Considerations
This procedure is an extension to the POSIX.1 standard.
SIGJMP_MASKSET_ is typically called from a signal handler before a
SIGLONGJMP_ procedure is executed. Using SIGJMP_MASKSET_ can avoid the
overhead of setting the signal mask in the jump buffer in an application with many
calls to SIGSETJMP_ and fewer calls to SIGLONGJMP_.
The buffer pointer env is assumed to be valid and initialized by an earlier
SETJMP_ or SIGSETJMP_ call. Otherwise, SIGJMP_MASKSET_ returns -1D and
errno is set to FE_EINVAL.
This procedure overwrites any signal mask that is already in the jump buffer.
Any invalid address passed to this procedure will cause the system to deliver a
nondeferrable system-generated signal to the process.
Only the SIGLONGJMP_ procedure, not the LONGJMP_ procedure, can be used
with a jump buffer modified by SIGJMP_MASKSET_.