|
|
20a5ca |
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
|
|
20a5ca |
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
|
|
20a5ca |
|
|
|
20a5ca |
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
|
|
73cc54 |
#define MINSIGSTKSZ 4096
|
|
|
73cc54 |
#define SIGSTKSZ 8192
|
|
|
20a5ca |
#endif
|
|
|
20a5ca |
|
|
|
20a5ca |
typedef struct {
|
|
|
73cc54 |
unsigned long uc_ctrl_word; /* 0x000 */
|
|
|
73cc54 |
unsigned long uc_status_word; /* 0x004 */
|
|
|
73cc54 |
unsigned long uc_tag_word; /* 0x008 */
|
|
|
73cc54 |
unsigned long uc_error_offset; /* 0x00c */
|
|
|
73cc54 |
unsigned long uc_error_selector; /* 0x010 */
|
|
|
73cc54 |
unsigned long uc_data_offset; /* 0x014 */
|
|
|
73cc54 |
unsigned long uc_data_selector; /* 0x018 */
|
|
|
73cc54 |
unsigned char uc_reg_area[80]; /* 0x01c */
|
|
|
73cc54 |
unsigned long uc_cr0_npx_state; /* 0x06c */
|
|
|
73cc54 |
} uc_xsave_fmt_t;
|
|
|
73cc54 |
|
|
|
20a5ca |
typedef struct {
|
|
|
73cc54 |
unsigned long uc_context_flags; /* 0x000 */
|
|
|
73cc54 |
unsigned long uc_dr0; /* 0x004 */
|
|
|
73cc54 |
unsigned long uc_dr1; /* 0x008 */
|
|
|
73cc54 |
unsigned long uc_dr2; /* 0x00c */
|
|
|
73cc54 |
unsigned long uc_dr3; /* 0x010 */
|
|
|
73cc54 |
unsigned long uc_dr6; /* 0x014 */
|
|
|
73cc54 |
unsigned long uc_dr7; /* 0x018 */
|
|
|
73cc54 |
|
|
|
73cc54 |
uc_xsave_fmt_t uc_float_save; /* 0x01c */
|
|
|
73cc54 |
|
|
|
73cc54 |
unsigned long uc_seg_gs; /* 0x08c */
|
|
|
73cc54 |
unsigned long uc_seg_fs; /* 0x090 */
|
|
|
73cc54 |
unsigned long uc_seg_es; /* 0x094 */
|
|
|
73cc54 |
unsigned long uc_seg_ds; /* 0x098 */
|
|
|
73cc54 |
unsigned long uc_edi; /* 0x09c */
|
|
|
73cc54 |
unsigned long uc_esi; /* 0x0a0 */
|
|
|
73cc54 |
unsigned long uc_ebx; /* 0x0a4 */
|
|
|
73cc54 |
unsigned long uc_edx; /* 0x0a8 */
|
|
|
73cc54 |
unsigned long uc_ecx; /* 0x0ac */
|
|
|
73cc54 |
unsigned long uc_eax; /* 0x0b0 */
|
|
|
73cc54 |
unsigned long uc_ebp; /* 0x0b4 */
|
|
|
73cc54 |
unsigned long uc_eip; /* 0x0b8 */
|
|
|
73cc54 |
unsigned long uc_seg_cs; /* 0x0bc */
|
|
|
73cc54 |
unsigned long uc_eflags; /* 0x0c0 */
|
|
|
73cc54 |
unsigned long uc_esp; /* 0x0c4 */
|
|
|
73cc54 |
unsigned long uc_seg_ss; /* 0x0c8 */
|
|
|
73cc54 |
unsigned char uc_extended_regs[512]; /* 0x0cc */
|
|
|
20a5ca |
} mcontext_t;
|
|
|
20a5ca |
|
|
|
20a5ca |
struct sigaltstack {
|
|
|
73cc54 |
void * ss_sp;
|
|
|
73cc54 |
int ss_flags;
|
|
|
73cc54 |
size_t ss_size;
|
|
|
20a5ca |
};
|
|
|
20a5ca |
|
|
|
20a5ca |
typedef struct __ucontext {
|
|
|
73cc54 |
unsigned int uc_csize;
|
|
|
73cc54 |
unsigned int uc_msize;
|
|
|
73cc54 |
unsigned int uc_pad[2];
|
|
|
73cc54 |
unsigned long uc_flags;
|
|
|
73cc54 |
unsigned long uc_opaquef[3];
|
|
|
73cc54 |
unsigned int uc_opaquec[8];
|
|
|
73cc54 |
unsigned long uc_reserved[32];
|
|
|
73cc54 |
unsigned long uc_align[2];
|
|
|
73cc54 |
stack_t uc_stack;
|
|
|
73cc54 |
struct __ucontext * uc_link;
|
|
|
73cc54 |
sigset_t uc_sigmask;
|
|
|
73cc54 |
mcontext_t uc_mcontext;
|
|
|
20a5ca |
} ucontext_t;
|
|
|
20a5ca |
|
|
|
20a5ca |
#define SA_NOCLDSTOP 1
|
|
|
20a5ca |
#define SA_NOCLDWAIT 2
|
|
|
20a5ca |
#define SA_SIGINFO 4
|
|
|
20a5ca |
#define SA_ONSTACK 0x08000000
|
|
|
20a5ca |
#define SA_RESTART 0x10000000
|
|
|
20a5ca |
#define SA_NODEFER 0x40000000
|
|
|
20a5ca |
#define SA_RESETHAND 0x80000000
|
|
|
20a5ca |
#define SA_RESTORER 0x04000000
|
|
|
20a5ca |
|
|
|
20a5ca |
#endif
|
|
|
20a5ca |
|
|
|
20a5ca |
#define SIGHUP 1
|
|
|
20a5ca |
#define SIGINT 2
|
|
|
20a5ca |
#define SIGQUIT 3
|
|
|
20a5ca |
#define SIGILL 4
|
|
|
20a5ca |
#define SIGTRAP 5
|
|
|
20a5ca |
#define SIGABRT 6
|
|
|
20a5ca |
#define SIGIOT SIGABRT
|
|
|
20a5ca |
#define SIGBUS 7
|
|
|
20a5ca |
#define SIGFPE 8
|
|
|
20a5ca |
#define SIGKILL 9
|
|
|
20a5ca |
#define SIGUSR1 10
|
|
|
20a5ca |
#define SIGSEGV 11
|
|
|
20a5ca |
#define SIGUSR2 12
|
|
|
20a5ca |
#define SIGPIPE 13
|
|
|
20a5ca |
#define SIGALRM 14
|
|
|
20a5ca |
#define SIGTERM 15
|
|
|
20a5ca |
#define SIGSTKFLT 16
|
|
|
20a5ca |
#define SIGCHLD 17
|
|
|
20a5ca |
#define SIGCONT 18
|
|
|
20a5ca |
#define SIGSTOP 19
|
|
|
20a5ca |
#define SIGTSTP 20
|
|
|
20a5ca |
#define SIGTTIN 21
|
|
|
20a5ca |
#define SIGTTOU 22
|
|
|
20a5ca |
#define SIGURG 23
|
|
|
20a5ca |
#define SIGXCPU 24
|
|
|
20a5ca |
#define SIGXFSZ 25
|
|
|
20a5ca |
#define SIGVTALRM 26
|
|
|
20a5ca |
#define SIGPROF 27
|
|
|
20a5ca |
#define SIGWINCH 28
|
|
|
20a5ca |
#define SIGIO 29
|
|
|
20a5ca |
#define SIGPOLL 29
|
|
|
20a5ca |
#define SIGPWR 30
|
|
|
20a5ca |
#define SIGSYS 31
|
|
|
20a5ca |
#define SIGUNUSED SIGSYS
|
|
|
20a5ca |
|
|
|
20a5ca |
#define _NSIG 65
|