Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 1 | #ifndef _UCONTEXT_H |
| 2 | #define _UCONTEXT_H |
| 3 | #ifdef __cplusplus |
| 4 | extern "C" { |
| 5 | #endif |
| 6 | |
Rich Felker | c1a9658 | 2012-09-07 23:13:55 -0400 | [diff] [blame] | 7 | #include <features.h> |
| 8 | |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 9 | #include <signal.h> |
| 10 | |
Rich Felker | ad2fe25 | 2011-02-18 22:03:03 -0500 | [diff] [blame] | 11 | #ifdef _GNU_SOURCE |
| 12 | #define ucontext __ucontext |
| 13 | #endif |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 14 | |
Rich Felker | 47e72e1 | 2011-06-29 17:13:01 -0400 | [diff] [blame] | 15 | struct __ucontext; |
| 16 | |
| 17 | int getcontext(struct __ucontext *); |
| 18 | void makecontext(struct __ucontext *, void (*)(void), int, ...); |
Rich Felker | acfd06d | 2011-07-31 00:10:29 -0400 | [diff] [blame] | 19 | int setcontext(const struct __ucontext *); |
Rich Felker | 47e72e1 | 2011-06-29 17:13:01 -0400 | [diff] [blame] | 20 | int swapcontext(struct __ucontext *, const struct __ucontext *); |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 21 | |
| 22 | #ifdef __cplusplus |
| 23 | } |
| 24 | #endif |
| 25 | #endif |