setjmp

Defines destination of longjmp()

#include <setjmp.h>
int setjmp (
        jmp_buf p
)

Arguments

p Environment storage variable

Return Value

When setjmp() is directly invoked, 0 is returned. If the return is from a call to longjmp(), val, the argument to longjmp() is returned.

Explanation

Saves environmental information (such as the stack pointer) in the memory area pointed to by p for later use by longjmp().

See Also

longjmp()