X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=include%2Fucontext.h;h=3bb776ed6a86969a530a558ff81506cfc7ccbb4b;hp=db335677b79717410dfed7bc587cd87019defa9a;hb=1ab59de81e94e7802f85d314a709f8350a0e9b65;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01 diff --git a/include/ucontext.h b/include/ucontext.h index db335677..3bb776ed 100644 --- a/include/ucontext.h +++ b/include/ucontext.h @@ -4,33 +4,20 @@ extern "C" { #endif -#include +#include -struct __fpstate { - unsigned long __x[7]; - unsigned char __y[80]; - unsigned long __z; -}; +#include -typedef struct { - unsigned long __gregs[19]; - void *__fpregs; - unsigned long __oldmask, __cr2; -} mcontext_t; +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define NGREG (sizeof(gregset_t)/sizeof(greg_t)) +#endif -typedef struct __ucontext { - unsigned long uc_flags; - struct __ucontext *uc_link; - stack_t uc_stack; - mcontext_t uc_mcontext; - sigset_t uc_sigmask; - struct __fpstate __fpregs_mem; -} ucontext_t; +struct __ucontext; -int getcontext(ucontext_t *); -void makecontext(ucontext_t *, void (*)(void), int, ...); -int setcontext(const ucontext_t *); -int swapcontext(ucontext_t *, const ucontext_t *); +int getcontext(struct __ucontext *); +void makecontext(struct __ucontext *, void (*)(void), int, ...); +int setcontext(const struct __ucontext *); +int swapcontext(struct __ucontext *, const struct __ucontext *); #ifdef __cplusplus }