#include <setjmp.h>
void longjmp(jmp_buf env, int val);
longjmp() performs a non-local jump to some location earlier in the call chain. That location must have been marked by a call to setjmp(). The environment at the time of that call to setjmp() - env, which also was the parameter to setjmp() - is restored and your application continues as if the call to setjmp() just had returned the value val.