Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (S)
Guardian Procedure Calls Reference Manual522629-013
14-143
SIGLONGJMP_ Procedure
specifies the value to be returned at the destination of the long jump; that is, at the
location of the corresponding SIGSETJMP_ call. If this value is set to 0D, then 1D
is returned; otherwise
value is returned.
Considerations
SIGLONGJMP_ is the TAL or pTAL procedure name for the C siglongjmp()
function. The C
siglongjmp() function complies with the POSIX.1 standard.
SIGLONGJMP_ does not return. Normally, return is made through the
corresponding SIGSETJMP_ procedure.
Restoring the signal mask with this procedure enables a native process to receive
multiple occurrences of the same nondeferrable signal when this procedure is used
to exit a signal handler. If the signal mask is not restored and the same
nondeferrable signal occurs a second time, then the process terminates.
See the SIGACTION_INIT_ procedure description for details on deferrable and
nondeferrable signals.
The buffer pointed to by env is assumed to be valid and initialized by an earlier call
to SIGSETJMP_. If an illegal address is passed or if the caller modifies the jump
buffer, the result is undefined and could cause the system to deliver a
nondeferrable signal to the process.
If SIGLONGJMP_ detects an error, a SIGABRT or SIGILL signal is raised.
If SIGLONGJMP_ is passed a jump buffer initialized by SETJMP_, then a simple
long jump (without restoring the signal mask) is executed.
The jump buffer must be accessible to both the long jump procedure call and the
associated set jump procedure call.
The procedure that invoked the corresponding call to SIGSETJMP_ must still be
active. That is, the activation record of the procedure that called SIGSETJMP_
must still be on the stack.
A long jump across a transition boundary between the TNS and native mode
environments, in either direction, is not permitted. Any attempt to do so will be fatal
to the process.
A nonprivileged caller cannot jump to a privileged area. Any attempt to do so will
be fatal to the process. A privileged caller, however, can execute a long jump
across the privilege boundary; privileges are automatically turned off before control
returns to the SIGSETJMP_ procedure.
As a result of optimization, the values of nonvolatile local variables in the
procedure that calls SIGSETJMP_ might not be the same as they were when
SIGLONGJMP_ was called if the variables are modified between the calls to
SIGSETJMP_ and SIGLONGJMP_. C and pTAL programs can declare variables
with the volatile type qualifier; this is the only safe way of preserving local variables