Performs a non-local jump.
void longjmp (jmp_buf save_jmp, int value);
Required Header |
<setjmp.h> |
Return Value
This function does not return.
Parameters
save_jmp
A saved state to jump-back to
value
The value to return to the calling setjmp function
Remarks
The longjmp function restores the stack and register state saved from a previous call to setjmp from save_jmp which causes the flow of execution to return a second time to setjmp. value is passed to the second return of setjmp, except, if value equals 0, the value 1 is passed.
The thread that called setjmp is the only thread allowed to use the saved state.
See Also setjmp