longjmp()

Restores processor state saved by setjmp().

  #include <setjmp.h>
  
  void longjmp(jmp_buf env, int val);    
Parameter

env

A processor state initialized by a call to setjmp()

val

A non-zero value that setjmp() will return.

Remarks

This function restores the calling environment (in other words, it returns program execution) to the state saved by the last call to setjmp() that used the env variable. Program execution continues from the call to setjmp(), which returns the argument val.

EWL redefines longjmp() for AltiVec support. To avoid an undefined result, make sure that both the "to" compilation unit (the source file that calls setjmp()) and "from" compilation unit (the source file that calls longjmp()) have AltiVec code generation enabled.

After a program invokes longjmp(), execution continues as if the corresponding call to the setjmp() function had just returned the value specified by val. The longjmp() function cannot cause the setjmp() function to return the value 0. If val is 0, the setjmp() function returns 1.

The env variable must be initialized by a previous call to setjmp() before being used by longjmp() to avoid undefined results in program execution.This facility may not be available on some configurations of the EWL.