sigsetjmp()

save calling environment 

Function


SYNOPSIS

#include <setjmp.h>

int sigsetjmp(sigjmp_buf env, int savemask);


DESCRIPTION

A call to sigsetjmp() saves the calling environment in its env parameter for later use by siglongjmp(). If the value of savemask is not zero, sigsetjmp() also saves the current signal mask of the calling thread as part of the calling environment.

When sigsetjmp() returns with a non-zero value, all accessible objects have values as of the time siglongjmp() was called, except that the values of objects of automatic duration which are local to the function containing the invocation of the corresponding sigsetjmp() which are not declared volatile and which are changed between the sigsetjmp() invocation and siglongjmp() call are indeterminate.

An invocation of sigsetjmp() must appear in one of the following contexts only:

The entire expression of an expression statement (possibly cast to void).


PARAMETERS

env 

Is the buffer where the calling thread's environment is saved.

savemask 

Determines whether or not the calling thread's signal mask is saved as part of the environment. If non-zero, the signal mask is saved. If zero, the signal mask is not saved.


RETURN VALUES

If the return is from a direct invocation, sigsetjmp() returns 0. If the return is from a call to siglongjmp(), sigsetjmp() returns a non-zero value.


CONFORMANCE

POSIX.1 (1996), with exceptions


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
_longjmp(), _setjmp(), longjmp(), pthread_sigmask(), setjmp(), siglongjmp(), sigprocmask()


PTC MKS Toolkit 10.4 Documentation Build 39.