|
0
|
1 #ifndef CYGONCE_LIBC_SETJMP_H |
|
|
2 #define CYGONCE_LIBC_SETJMP_H |
|
|
3 //=========================================================================== |
|
|
4 // |
|
|
5 // setjmp.h |
|
|
6 // |
|
|
7 // ANSI standard non-local jumps |
|
|
8 // |
|
|
9 //=========================================================================== |
|
|
10 //####COPYRIGHTBEGIN#### |
|
|
11 // |
|
|
12 // ------------------------------------------- |
|
|
13 // The contents of this file are subject to the Cygnus eCos Public License |
|
|
14 // Version 1.0 (the "License"); you may not use this file except in |
|
|
15 // compliance with the License. You may obtain a copy of the License at |
|
|
16 // http://sourceware.cygnus.com/ecos |
|
|
17 // |
|
|
18 // Software distributed under the License is distributed on an "AS IS" |
|
|
19 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the |
|
|
20 // License for the specific language governing rights and limitations under |
|
|
21 // the License. |
|
|
22 // |
|
|
23 // The Original Code is eCos - Embedded Cygnus Operating System, released |
|
|
24 // September 30, 1998. |
|
|
25 // |
|
|
26 // The Initial Developer of the Original Code is Cygnus. Portions created |
|
|
27 // by Cygnus are Copyright (C) 1998 Cygnus Solutions. All Rights Reserved. |
|
|
28 // ------------------------------------------- |
|
|
29 // |
|
|
30 //####COPYRIGHTEND#### |
|
|
31 //=========================================================================== |
|
|
32 //#####DESCRIPTIONBEGIN#### |
|
|
33 // |
|
|
34 // Author(s): jlarmour@cygnus.co.uk |
|
|
35 // Contributors: jlarmour@cygnus.co.uk |
|
|
36 // Date: 1998-02-13 |
|
|
37 // Purpose: |
|
|
38 // Description: Header file to implement ANSI standard non-local jumps as |
|
|
39 // per ANSI para 7.6 |
|
|
40 // Usage: #include <setjmp.h> |
|
|
41 // |
|
|
42 //####DESCRIPTIONEND#### |
|
|
43 // |
|
|
44 //=========================================================================== |
|
|
45 |
|
|
46 // CONFIGURATION |
|
|
47 |
|
|
48 #include <pkgconf/libc.h> // Configuration header |
|
|
49 |
|
|
50 // Include the C library? |
|
|
51 #ifdef CYGPKG_LIBC |
|
|
52 |
|
|
53 // INCLUDES |
|
|
54 |
|
|
55 #include <cyg/infra/cyg_type.h> // Common type definitions and support |
|
|
56 #include <cyg/infra/cyg_trac.h> // Common tracing code |
|
|
57 #include <cyg/hal/hal_arch.h> // HAL architecture specific implementation |
|
|
58 |
|
|
59 |
|
|
60 // TYPE DEFINITIONS |
|
|
61 |
|
|
62 // jmp_buf as per ANSI 7.6. This is simply the underlying HAL buffer |
|
|
63 |
|
|
64 typedef hal_jmp_buf jmp_buf; |
|
|
65 |
|
|
66 // MACROS |
|
|
67 |
|
|
68 // setjmp() function, as described in ANSI para 7.6.1.1 |
|
|
69 #define setjmp( __env__ ) hal_setjmp( __env__ ) |
|
|
70 |
|
|
71 // FUNCTION PROTOTYPES |
|
|
72 |
|
|
73 // longjmp() function, as described in ANSI para 7.6.2.1 |
|
|
74 externC void |
|
|
75 longjmp( jmp_buf, int ) CYGPRI_LIBC_NORETURN; |
|
|
76 |
|
|
77 |
|
|
78 // INLINE FUNCTIONS |
|
|
79 |
|
|
80 #ifdef CYGIMP_LIBC_SETJMP_INLINES |
|
|
81 # include <setjmp.inl> |
|
|
82 #endif |
|
|
83 |
|
|
84 |
|
|
85 #endif // ifdef CYGPKG_LIBC |
|
|
86 |
|
|
87 #endif // CYGONCE_LIBC_SETJMP_H multiple inclusion protection |
|
|
88 |
|
|
89 // EOF setjmp.h |