1 04e0a9bb 2011-10-14 rsc #define setcontext(u) libthread_setmcontext(&(u)->mc)
2 04e0a9bb 2011-10-14 rsc #define getcontext(u) libthread_getmcontext(&(u)->mc)
3 04e0a9bb 2011-10-14 rsc typedef struct mcontext mcontext_t;
4 04e0a9bb 2011-10-14 rsc typedef struct ucontext ucontext_t;
6 04e0a9bb 2011-10-14 rsc struct mcontext
25 04e0a9bb 2011-10-14 rsc // XXX: currently do not save vector registers or floating-point state
29 04e0a9bb 2011-10-14 rsc struct ucontext
33 04e0a9bb 2011-10-14 rsc uint ss_size;
35 04e0a9bb 2011-10-14 rsc sigset_t uc_sigmask;
36 04e0a9bb 2011-10-14 rsc mcontext_t mc;
39 04e0a9bb 2011-10-14 rsc void makecontext(ucontext_t*, void(*)(void), int, ...);
40 04e0a9bb 2011-10-14 rsc int swapcontext(ucontext_t*, ucontext_t*);
41 04e0a9bb 2011-10-14 rsc int libthread_getmcontext(mcontext_t*);
42 04e0a9bb 2011-10-14 rsc void libthread_setmcontext(mcontext_t*);