User manual

Table Of Contents
646
mikoC PRO for PIC32
MikroElektronika
Setjmp Library
The Setjmp library contains functions and types denitions for bypassing the normal function call and return
discipline.
jmp_buf is an array of unsigned int type suitable for holding information needed to restore a calling environment. Type
declaration is contained in the sejmp.h header le which can be found in the include folder of the compiler.
Library Routines
- Setjmp
- Longjmp
Setjmp
Prototype
int Setjmp(jmp_buf env);
Description This function saves calling position for a later use by Longjmp.
Parameters - env: buffer suitable for holding information needed for restoring calling environment
Returns - 0 if the return is from direct invocation
- nonzero value if the return is from a call to Longjmp (this value will be set by the Longjmp
routine)
Requires Nothing.
Example
jmp_buf buf;
...
Setjmp(buf);
Notes None.