Warning: This file is not a C or C++ file. It does not have highlighting.
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
|---|---|
| 2 | #ifndef __UML_LONGJMP_H |
| 3 | #define __UML_LONGJMP_H |
| 4 | |
| 5 | #include <sysdep/archsetjmp.h> |
| 6 | #include <os.h> |
| 7 | |
| 8 | extern int setjmp(jmp_buf); |
| 9 | extern void longjmp(jmp_buf, int); |
| 10 | |
| 11 | #define UML_LONGJMP(buf, val) do { \ |
| 12 | longjmp(*buf, val); \ |
| 13 | } while(0) |
| 14 | |
| 15 | #define UML_SETJMP(buf) ({ \ |
| 16 | int n, enable; \ |
| 17 | enable = um_get_signals(); \ |
| 18 | n = setjmp(*buf); \ |
| 19 | if(n != 0) \ |
| 20 | um_set_signals_trace(enable); \ |
| 21 | n; }) |
| 22 | |
| 23 | #endif |
| 24 |
Warning: This file is not a C or C++ file. It does not have highlighting.
