1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #ifndef _SYS_UCONTEXT_H
- #define _SYS_UCONTEXT_H 1
- #include <features.h>
- #include <signal.h>
- #include <bits/sigcontext.h>
- typedef struct sigcontext mcontext_t;
- #if __GNUC_PREREQ (3, 5)
- # define _SC_GR0_OFFSET \
- __builtin_offsetof (struct sigcontext, sc_gr[0])
- #elif defined __GNUC__
- # define _SC_GR0_OFFSET \
- (((char *) &((struct sigcontext *) 0)->sc_gr[0]) - (char *) 0)
- #else
- # define _SC_GR0_OFFSET 0xc8
- #endif
- typedef struct ucontext
- {
- union
- {
- mcontext_t _mc;
- struct
- {
- unsigned long _pad[_SC_GR0_OFFSET/8];
- struct ucontext *_link;
- }
- _uc;
- }
- _u;
- }
- ucontext_t;
- #define uc_mcontext _u._mc
- #define uc_sigmask _u._mc.sc_mask
- #define uc_stack _u._mc.sc_stack
- #define uc_link _u._uc._link
- #endif
|