Adam Barth | 57eacf5 | 2020-11-04 00:38:09 +0000 | [diff] [blame] | 1 | #ifndef SYSROOT_UCONTEXT_H_ |
| 2 | #define SYSROOT_UCONTEXT_H_ |
Doug Horn | 1427b6a | 2018-12-11 13:19:16 -0800 | [diff] [blame] | 3 | |
| 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | |
| 8 | #include <features.h> |
Doug Horn | 1427b6a | 2018-12-11 13:19:16 -0800 | [diff] [blame] | 9 | #include <signal.h> |
| 10 | |
| 11 | #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
| 12 | #define NGREG (sizeof(gregset_t) / sizeof(greg_t)) |
| 13 | #endif |
| 14 | |
| 15 | struct __ucontext; |
| 16 | |
| 17 | int getcontext(struct __ucontext*); |
| 18 | void makecontext(struct __ucontext*, void (*)(void), int, ...); |
| 19 | int setcontext(const struct __ucontext*); |
| 20 | int swapcontext(struct __ucontext*, const struct __ucontext*); |
| 21 | |
| 22 | #ifdef __cplusplus |
| 23 | } |
| 24 | #endif |
Adam Barth | 57eacf5 | 2020-11-04 00:38:09 +0000 | [diff] [blame] | 25 | |
| 26 | #endif // SYSROOT_UCONTEXT_H_ |