next up previous contents
Next: The <stddef.h> Header File Up: Reference of Support for Previous: The <float.h> Header File

Nonlocal Jumps <setjmp.h>

# include  <setjmp.h>
extern "C" int setjmp(jmp\_buf env);
extern "C" void longjmp(jmp\_buf env, int val);

This header declares setjmp, longjmp and the necessary types associated with the task of jumping long. These functions are supported completely and according to the standard (or not at all if your CPU type has no implementation). All the limitations of the standard apply here, most notably the limitation that the env stored by setjmp is only valid up to the point where the frame containing the setjmp returns, for example by a return statement.

These functions have external linkage and the implementations (most likely in assembly) are in the ucr core library. A new CPU port will need to provide the necessary implementations, but only if you wish to use it as uCR makes no calls to these functions.



Stephen Williams
9/2/1997