diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-02-12 00:22:29 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-02-12 00:22:29 -0500 |
commit | 0b44a0315b47dd8eced9f3b7f31580cf14bbfc01 (patch) | |
tree | 6eaef0d8a720fa3da580de87b647fff796fe80b3 /include/ucontext.h | |
download | musl-0b44a0315b47dd8eced9f3b7f31580cf14bbfc01.tar.gz musl-0b44a0315b47dd8eced9f3b7f31580cf14bbfc01.tar.bz2 musl-0b44a0315b47dd8eced9f3b7f31580cf14bbfc01.tar.xz musl-0b44a0315b47dd8eced9f3b7f31580cf14bbfc01.zip |
initial check-in, version 0.5.0v0.5.0
Diffstat (limited to 'include/ucontext.h')
-rw-r--r-- | include/ucontext.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/ucontext.h b/include/ucontext.h new file mode 100644 index 00000000..db335677 --- /dev/null +++ b/include/ucontext.h @@ -0,0 +1,38 @@ +#ifndef _UCONTEXT_H +#define _UCONTEXT_H +#ifdef __cplusplus +extern "C" { +#endif + +#include <signal.h> + +struct __fpstate { + unsigned long __x[7]; + unsigned char __y[80]; + unsigned long __z; +}; + +typedef struct { + unsigned long __gregs[19]; + void *__fpregs; + unsigned long __oldmask, __cr2; +} mcontext_t; + +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; + +int getcontext(ucontext_t *); +void makecontext(ucontext_t *, void (*)(void), int, ...); +int setcontext(const ucontext_t *); +int swapcontext(ucontext_t *, const ucontext_t *); + +#ifdef __cplusplus +} +#endif +#endif |