|ARM Technical Support Knowledge Articles|
Applies to: C51 C Compiler
Information in this article applies to:
Can the setjmp and longjmp functions be used in code banking programs and/or RTX51 programs?
The setjmp and longjmp functions may be used in code banking programs as long as the setjmp and longjmp target located within the same code bank or the common area. Problems arise when jumping from a code bank to the common area or when jumping from the common area to a code bank.
The same rules apply for RTX51 programs. Additionally, the setjmp and longjmp target must be located in the same task context. It is impossible to jump from one task to another since different tasks use different stacks.
It is not safe to use setjmp and longjmp with RTX51 Tiny since this operating system performs dynamic stack swapping.
Article last edited on: 2005-07-18 18:26:51
Did you find this article helpful? Yes No
How can we improve this article?