siglongjmp()

restore environment saved by sigsetjmp() 

Function


SYNOPSIS

#include <setjmp.h>

void siglongjmp(sigjmp_buf env, int val);


DESCRIPTION

The siglongjmp() function restores the environment saved by the most recent invocation of sigsetjmp() in the same thread, with the corresponding env argument. If there is no such invocation, or if the function containing the invocation of sigsetjmp() has terminated execution in the interim, the behavior is undefined. The siglongjmp() function restores the calling thread's signal mask if and only if env was initialized by a call to sigsetjmp() with a non-zero value for savemask.

All accessible objects have values as of the time sigsetjmp() was called, except that the values of objects of automatic storage are indeterminate if they meet all of the following conditions:

As it bypasses the usual function call and return mechanisms, siglongjmp() executes correctly in contexts of interrupts and any of their associated functions. However, if siglongjmp() is invoked from a nested signal handler (that is, from a function invoked as a result of signal raised during the handling of another signal), the behavior is undefined.


PARAMETERS

env 

Is the buffer where the calling thread's environment has been saved.

val 

Is the preferred return value from sigsetjmp().


RETURN VALUES

After siglongjmp() is completed, program execution continues as if the corresponding invocation of sigsetjmp() had just returned with the value specified by val. The siglongjmp() function cannot cause sigsetjmp() to return 0; if val is 0, sigsetjmp() returns 1.


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(), sigprocmask(), sigsetjmp()


PTC MKS Toolkit 10.4 Documentation Build 39.