added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / arch / .unmaintained / arm-all / clib / setjmp.s
blob2f033d4f3d0eb0f6bb77a102e8f93066dd6ada23
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: setjmp
6 Lang: english
7 */
9 /******************************************************************************
11 NAME
12 #include <setjmp.h>
14 int setjmp (jmp_buf env);
16 FUNCTION
17 Save the current context so that you can return to it later.
19 INPUTS
20 env - The context/environment is saved here for later restoring
22 RESULT
23 0 if it returns from setjmp() and 1 when it returns from longjmp().
25 NOTES
27 EXAMPLE
28 jmp_buf env;
30 ... some code ...
32 if (!setjmp (env))
34 ... this code is executed after setjmp() returns ...
36 // This is no good example on how to use this function
37 // You should not do that
38 if (error)
39 longjmp (env, 5);
41 ... some code ...
43 else
45 ... this code is executed if you call longjmp(env) ...
48 BUGS
50 SEE ALSO
51 longjmp()
53 INTERNALS
55 HISTORY
57 ******************************************************************************/
59 #include "../include/aros/machine.i"
61 .text
62 .balign 4
63 .globl setjmp
65 .set FirstArg, 4 /* Skip Return-Adress */
66 .set env, FirstArg
67 .set retaddr, 0
69 setjmp: