use macro for getcontext (setjmp)
This commit is contained in:
parent
b4d5d19438
commit
1e05fdf92c
8 changed files with 25 additions and 56 deletions
|
|
@ -13,8 +13,10 @@
|
|||
#include "thread.h"
|
||||
|
||||
#if defined(__FreeBSD__) && __FreeBSD__ < 5
|
||||
extern int getcontext(ucontext_t*);
|
||||
extern void setcontext(ucontext_t*);
|
||||
extern int getmcontext(mcontext_t*);
|
||||
extern void setmcontext(mcontext_t*);
|
||||
#define setcontext(u) setmcontext(&(u)->uc_mcontext)
|
||||
#define getcontext(u) getmcontext(&(u)->uc_mcontext)
|
||||
extern int swapcontext(ucontext_t*, ucontext_t*);
|
||||
extern void makecontext(ucontext_t*, void(*)(), int, ...);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue