]>
Commit | Line | Data |
---|---|---|
1d7173ba JD |
1 | #ifndef __UML_LONGJMP_H |
2 | #define __UML_LONGJMP_H | |
3 | ||
37185b33 AV |
4 | #include <sysdep/archsetjmp.h> |
5 | #include <os.h> | |
1d7173ba | 6 | |
13c06be3 JD |
7 | extern int setjmp(jmp_buf); |
8 | extern void longjmp(jmp_buf, int); | |
9 | ||
ad28e029 | 10 | #define UML_LONGJMP(buf, val) do { \ |
c83d4635 | 11 | longjmp(*buf, val); \ |
1d7173ba JD |
12 | } while(0) |
13 | ||
a5df0d1a | 14 | #define UML_SETJMP(buf) ({ \ |
b5cdb579 PBG |
15 | int n; \ |
16 | volatile int enable; \ | |
1d7173ba | 17 | enable = get_signals(); \ |
c83d4635 | 18 | n = setjmp(*buf); \ |
1d7173ba JD |
19 | if(n != 0) \ |
20 | set_signals(enable); \ | |
21 | n; }) | |
22 | ||
23 | #endif |