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;
11 ulong sp; /* callee saved: r1 */
12 ulong toc; /* callee saved: r2 */
13 ulong r3; /* first arg to function, return register: r3 */
14 ulong gpr[19]; /* callee saved: r13-r31 */
15 // XXX: currently do not save vector registers or floating-point state
17 // uvlong fpr[18]; /* callee saved: f14-f31 */
18 // ulong vr[4*12]; /* callee saved: v20-v31, 256-bits each */
31 void makecontext(ucontext_t*, void(*)(void), int, ...);
32 int swapcontext(ucontext_t*, ucontext_t*);
33 int _getmcontext(mcontext_t*);
34 void _setmcontext(mcontext_t*);