Blob


1 #define setcontext(u) _setmcontext(&(u)->mc)
2 #define getcontext(u) _getmcontext(&(u)->mc)
3 typedef struct mcontext mcontext_t;
4 typedef struct ucontext ucontext_t;
5 struct mcontext
6 {
7 int r[16];
8 };
10 struct ucontext
11 {
12 struct {
13 void *ss_sp;
14 uint ss_size;
15 } uc_stack;
16 sigset_t uc_sigmask;
17 mcontext_t mc;
18 };
20 void makecontext(ucontext_t*, void(*)(void), int, ...);
21 int swapcontext(ucontext_t*, ucontext_t*);
22 int _getmcontext(mcontext_t*);
23 void _setmcontext(mcontext_t*);