about summary refs log tree commit diff
path: root/include/ucontext.h
blob: db335677b79717410dfed7bc587cd87019defa9a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef _UCONTEXT_H
#define _UCONTEXT_H
#ifdef __cplusplus
extern "C" {
#endif

#include <signal.h>

struct __fpstate {
	unsigned long __x[7];
	unsigned char __y[80];
	unsigned long __z;
};

typedef struct {
	unsigned long __gregs[19];
	void *__fpregs;
	unsigned long __oldmask, __cr2;
} mcontext_t;

typedef struct __ucontext {
	unsigned long uc_flags;
	struct __ucontext *uc_link;
	stack_t uc_stack;
	mcontext_t uc_mcontext;
	sigset_t uc_sigmask;
	struct __fpstate __fpregs_mem;
} ucontext_t;

int  getcontext(ucontext_t *);
void makecontext(ucontext_t *, void (*)(void), int, ...);
int  setcontext(const ucontext_t *);
int  swapcontext(ucontext_t *, const ucontext_t *);

#ifdef __cplusplus
}
#endif
#endif