xref: /relibc/include/setjmp.h (revision a321545fd05362c08f79e5b47a1985246a17f3df)
1 #ifndef _SETJMP_H
2 #define _SETJMP_H
3 
4 #ifdef __aarch64__
5 typedef unsigned long jmp_buf[22];
6 #endif
7 
8 #ifdef __arm__
9 typedef unsigned long long jmp_buf[32];
10 #endif
11 
12 #ifdef __i386__
13 typedef unsigned long jmp_buf[6];
14 #endif
15 
16 #ifdef __m68k__
17 typedef unsigned long jmp_buf[39];
18 #endif
19 
20 #ifdef __microblaze__
21 typedef unsigned long jmp_buf[18];
22 #endif
23 
24 #ifdef __mips__
25 typedef unsigned long long jmp_buf[13];
26 #endif
27 
28 #ifdef __mips64__
29 typedef unsigned long long jmp_buf[23];
30 #endif
31 
32 #ifdef __mipsn32__
33 typedef unsigned long long jmp_buf[23];
34 #endif
35 
36 #ifdef __or1k__
37 typedef unsigned long jmp_buf[13];
38 #endif
39 
40 #ifdef __powerpc__
41 typedef unsigned long long jmp_buf[56];
42 #endif
43 
44 #ifdef __powerpc64__
45 typedef uint128_t jmp_buf[32];
46 #endif
47 
48 #ifdef __s390x__
49 typedef unsigned long jmp_buf[18];
50 #endif
51 
52 #ifdef __sh__
53 typedef unsigned long jmp_buf[15];
54 #endif
55 
56 #ifdef __x32__
57 typedef unsigned long long jmp_buf[8];
58 #endif
59 
60 #ifdef __x86_64__
61 typedef unsigned long jmp_buf[8];
62 #endif
63 
64 #ifdef __cplusplus
65 extern "C" {
66 #endif
67 
68 int setjmp(jmp_buf buf);
69 void longjmp(jmp_buf buf, int value);
70 
71 #ifdef __cplusplus
72 } // extern "C"
73 #endif
74 
75 #endif /* _SETJMP_H */
76