Open System Services Library Calls Reference Manual (G06.27+, H06.04+)
OSS Library Calls (s) siglongjmp(3)
NAME
siglongjmp - Performs a nonlocal goto with signal handling
LIBRARY
G-series native OSS processes: system library
H-series OSS processes: implicit libraries
SYNOPSIS
#include <setjmp.h>
void siglongjmp(
sigjmp_buf env,
int value);
PARAMETERS
env Specifies the address of a sigjmp_buf structure containing the environment to be
restored.
value Specifies a nonzero value to be returned from the corresponding
sigsetjmp()
call.
DESCRIPTION
The siglongjmp() function restores the environment to the values set in the env parameter by a
previous call to the sigsetjmp() function. The siglongjmp() function restores the saved signal
mask if and only if the sigsetjmp( ) call that saved env was called with a nonzero savemask
parameter.
All accessible objects have values as of the time siglongjmp() is called, except that the values of
objects of automatic storage duration that have been changed between the sigsetjmp() call and
the siglongjmp() call are indeterminate.
Because it bypasses the usual function call and return mechanisms, the siglongjmp() function
executes correctly in the context of signals and their associated functions.
The process should not depend upon preservation of the values in native processor registers or
the values in local variables after a jump. If the value of a local variable must be reused after a
jump, the variable must be typed volatile.
If the process is using IEEE floating-point data, the contents of all floating-point registers except
the status and control register are preserved.
The env parameter must have been initialized by an earlier call to the sigsetjmp( ) function and
must not have been modified since it was saved. The results of the siglongjmp() call are
unspecified if env was not initialized or if it was modified since it was saved.
The extended data segment is part of the state saved by the sigsetjmp() function. If the extended
data segment that was in use at the time of the sigsetjmp() call no longer exists, the process still
jumps to the saved location. However, the process will no longer have an extended data segment
in use, even if one is in use when the siglongjmp() function is called.
Use From the Guardian Environment
The behavior of this function is undefined if it is called from a TNS or accelerated Guardian pro-
cess or from any privileged process.
RETURN VALUES
After the siglongjmp() function is finished, program execution continues as if the corresponding
call of the sigsetjmp() function had just returned the value specified by the value parameter.
The siglongjmp() function cannot cause the sigsetjmp( ) function to return the value 0 (zero); if
value is 0, the sigsetjmp() function returns the value 1.
527187-004 Hewlett-Packard Company 6−41