Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

sigsetjmp(3) OSS Library Calls Reference Manual
NAME
sigsetjmp - Saves the current execution context for a nonlocal goto with signal handling
LIBRARY
G-series native OSS processes: system library
H-series and J-series OSS processes: implicit libraries
SYNOPSIS
#include <setjmp.h>
int sigsetjmp(
sigjmp_buf env,
int savemask);
PARAMETERS
env Specifies the address of the sigjmp_buf structure in which to save the current
environment.
savemask Specifies whether the current signal mask should be saved. A nonzero value
saves the current signal mask.
DESCRIPTION
The sigsetjmp( ) function saves its calling environment in the structure specified by the env
parameter for later use by the siglongjmp( ) function. The saved environment includes the value
of the errno variable, the identity of the current extended data segment, and the contents of the
process register set.
If the value of the savemask parameter is not 0 (zero), the sigsetjmp( ) function also saves the
processs current signal mask as part of the calling environment.
The calling process must not examine or modify the contents of the env parameter after calling
the sigsetjmp( ) function. The results of calling the siglongjmp( ) function are undefined if the
caller changes the contents of env.
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.
Use From the Guardian Environment
The actions of this function are undefined if it is called from a TNS or accelerated Guardian pro-
cess or from any privileged process.
RETURN VALUES
If the return is from a successful direct invocation, the sigsetjmp( ) function returns the value 0
(zero). A return from the siglongjmp( ) function returns to the same location to which the sig-
setjmp( ) function returns. In this case, the return has a nonzero value as specified in the
siglongjmp( ) function call.
ERRORS
The sigsetjmp( ) function never sets the value of errno. Instead, if the call is unsuccessful, an
undefined signal that cannot be caught, blocked, or ignored is delivered to the calling process.
RELATED INFORMATION
Functions: longjmp(3), setjmp(3), sigaction(2), siglongjmp(3), signal(3), sigprocmask(2), sig-
suspend(2).
Files: signal(4).
664 Hewlett-Packard Company 527187-017