Standard C Libraries -. More...
Go to the source code of this file.
Typedefs | |
typedef unsigned int | jmp_buf [18] |
Functions | |
int | setjmp (jmp_buf env) |
void | longjmp (jmp_buf env, int val) |
Standard C Libraries -.
The header file, setjmp.h, consists of a type, a macro and a function that allow control transfers to occur that bypass the normal function call and return process.
The documentation in this header file has been copied from the documentation provided with the Microchip MPLAB XC16 compiler. The original license agreement included with the XC16 compiler applies!
typedef unsigned int jmp_buf[18] |
Description: A type that is an array used by setjmp and longjmp to save and restore the program environment.
Include: <setjmp.h>
Remarks:
_NSETJMP is defined as 16 + 2 that represents 16 registers and a 32-bit return address.
void longjmp | ( | jmp_buf | env, |
int | val | ||
) |
Description: A function that restores the environment saved by setjmp.
Include: <setjmp.h>
env | variable where environment is stored |
val | value to be returned to setjmp call. |
Remarks:
The value parameter, val, should be non-zero. If longjmp is invoked from a nested signal handler (that is, invoked as a result of a signal raised during the handling of another signal), the behavior is undefined.
int setjmp | ( | jmp_buf | env) |
Description: A macro that saves the current state of the program for later use by longjmp.
Include: <setjmp.h>
env | variable where environment is stored |
Example:
See longjmp.