use macro for getcontext (setjmp)

This commit is contained in:
rsc 2005-11-04 16:34:19 +00:00
parent b4d5d19438
commit 1e05fdf92c
8 changed files with 25 additions and 56 deletions

View file

@ -13,21 +13,6 @@ makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
ucp->uc_mcontext.mc_esp = (int)sp;
}
extern int getmcontext(mcontext_t*);
extern int setmcontext(mcontext_t*);
int
getcontext(ucontext_t *uc)
{
return getmcontext(&uc->uc_mcontext);
}
void
setcontext(ucontext_t *uc)
{
setmcontext(&uc->uc_mcontext);
}
int
swapcontext(ucontext_t *oucp, ucontext_t *ucp)
{