blob: db335677b79717410dfed7bc587cd87019defa9a [file] [log] [blame]
Rich Felker0b44a032011-02-12 00:22:29 -05001#ifndef _UCONTEXT_H
2#define _UCONTEXT_H
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7#include <signal.h>
8
9struct __fpstate {
10 unsigned long __x[7];
11 unsigned char __y[80];
12 unsigned long __z;
13};
14
15typedef struct {
16 unsigned long __gregs[19];
17 void *__fpregs;
18 unsigned long __oldmask, __cr2;
19} mcontext_t;
20
21typedef struct __ucontext {
22 unsigned long uc_flags;
23 struct __ucontext *uc_link;
24 stack_t uc_stack;
25 mcontext_t uc_mcontext;
26 sigset_t uc_sigmask;
27 struct __fpstate __fpregs_mem;
28} ucontext_t;
29
30int getcontext(ucontext_t *);
31void makecontext(ucontext_t *, void (*)(void), int, ...);
32int setcontext(const ucontext_t *);
33int swapcontext(ucontext_t *, const ucontext_t *);
34
35#ifdef __cplusplus
36}
37#endif
38#endif