[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
longjmp

Restore the processor state saved by setjmp().
Compatibility:
This function is compatible with the following targets:
Prototype:
#include <setjmp.h>
void longjmp(jmp_buf env, int val);
Parameters:
Parameters for this facility are:
Remarks:
The longjmp() function restores the calling environment (i.e. returns program execution) to the state saved by the last called setjmp() to use the env variable. Program execution continues from the setjmp() function. The val argument is the value returned by setjmp() when the processor state is restored.
WARNING!
The longjmp function is redefined when AltiVec support is enabled. The programmer must ensure that both the "to" compilation unit and "from" compilation unit have AltiVec enabled. Failure to do so will create an undesired result.
Returns:
After longjmp is completed, program execution continues as if the corresponding invocation of the setjmp macro had just returned the value specified by val. The longjmp function cannot cause the setjmp macro to return the value 0; if val is 0, the setjmp macro returns the value 1.
WARNING!
The env variable must be initialized by a previously executed setjmp() before being used by longjmp() to avoid undesired results in program execution.
See Also:
"setjmp"
"signal"
"abort"
For example of longjmp() usage:
"setjmp() example".
[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.
Last updated: August 16, 2000