#include <setjmp.h>
void siglongjmp(sigjmp_buf env,
int val);
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:
-
They are local to the function containing the corresponding
sigsetjmp() invocation.
-
They are not qualified with volatile.
-
They are changed between the sigsetjmp() invocation and
siglongjmp() call.
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.
- env
-
Is the buffer where the calling thread's environment has been saved.
- val
-
Is the preferred return value from sigsetjmp().
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.
POSIX.1 (1996), with exceptions
MT-Safe.
None.
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
- Functions:
- _longjmp(), _setjmp(), longjmp(), pthread_sigmask(), setjmp(), sigprocmask(), sigsetjmp()
MKS Toolkit 9.2 Documentation Build 16.