Last change
on this file since 444 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
870 bytes
|
Line | |
---|
1 | /* |
---|
2 | setjmp.h |
---|
3 | stubs for future use. |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _SETJMP_H_ |
---|
7 | #ifdef __cplusplus |
---|
8 | extern "C" { |
---|
9 | #endif |
---|
10 | #define _SETJMP_H_ |
---|
11 | |
---|
12 | #include "_ansi.h" |
---|
13 | #include <machine/setjmp.h> |
---|
14 | #include <signal.h> /* for sigset_t and sigprocmask */ |
---|
15 | |
---|
16 | typedef struct __sigjmpbuf |
---|
17 | { |
---|
18 | __jmp_buf __buf; |
---|
19 | int __is_mask_saved; |
---|
20 | sigset_t __saved_mask; |
---|
21 | } sigjmp_buf; |
---|
22 | |
---|
23 | typedef __jmp_buf jmp_buf; |
---|
24 | |
---|
25 | void longjmp (jmp_buf __jmpb, int __retval); |
---|
26 | int setjmp (jmp_buf __jmpb); |
---|
27 | void siglongjmp (sigjmp_buf __jmpb, int __retval); |
---|
28 | int sigsetjmp (sigjmp_buf __jmpb, int __savemask); |
---|
29 | |
---|
30 | /* sigsetjmp is implemented as macro using setjmp */ |
---|
31 | |
---|
32 | #define sigsetjmp(__jmpb, __savemask) \ |
---|
33 | ( __jmpb.__is_mask_saved = __savemask && \ |
---|
34 | (sigprocmask (SIG_BLOCK, NULL, &__jmpb.__saved_mask) == 0), \ |
---|
35 | setjmp (__jmpb.__buf) ) |
---|
36 | |
---|
37 | #ifdef __cplusplus |
---|
38 | } |
---|
39 | #endif |
---|
40 | #endif /* _SETJMP_H_ */ |
---|
41 | |
---|
Note: See
TracBrowser
for help on using the repository browser.