|
 |
87820a |
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
|
 |
87820a |
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
|
 |
87820a |
|
|
 |
cfe6f1 |
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
|
 |
4a7000 |
#define MINSIGSTKSZ 4096
|
|
 |
4a7000 |
#define SIGSTKSZ 8192
|
|
 |
cfe6f1 |
#endif
|
|
 |
cfe6f1 |
|
|
 |
87820a |
typedef struct {
|
|
 |
a858f4 |
unsigned long uc_low;
|
|
 |
a858f4 |
signed long uc_high;
|
|
 |
a858f4 |
} uc_m128a_t;
|
|
 |
a858f4 |
|
|
 |
a858f4 |
typedef struct {
|
|
 |
a858f4 |
unsigned short uc_control_word;
|
|
 |
a858f4 |
unsigned short uc_status_word;
|
|
 |
a858f4 |
unsigned char uc_tag_word;
|
|
 |
a858f4 |
unsigned char uc_reserved1;
|
|
 |
a858f4 |
unsigned short uc_error_opcode;
|
|
 |
a858f4 |
unsigned int uc_error_offset;
|
|
 |
a858f4 |
unsigned short uc_error_selector;
|
|
 |
a858f4 |
unsigned short uc_reserved2;
|
|
 |
a858f4 |
unsigned int uc_data_offset;
|
|
 |
a858f4 |
unsigned short uc_data_selector;
|
|
 |
a858f4 |
unsigned short uc_reserved3;
|
|
 |
a858f4 |
unsigned int uc_mx_csr;
|
|
 |
a858f4 |
unsigned int uc_mx_csr_mask;
|
|
 |
a858f4 |
uc_m128a_t uc_float_registers[8];
|
|
 |
a858f4 |
} uc_xsave_fmt_t;
|
|
 |
a858f4 |
|
|
 |
a858f4 |
typedef struct {
|
|
 |
a858f4 |
unsigned long uc_p1_home;
|
|
 |
a858f4 |
unsigned long uc_p2_home;
|
|
 |
a858f4 |
unsigned long uc_p3_home;
|
|
 |
a858f4 |
unsigned long uc_p4_home;
|
|
 |
a858f4 |
unsigned long uc_p5_home;
|
|
 |
a858f4 |
unsigned long uc_p6_home;
|
|
 |
a858f4 |
unsigned int uc_context_flags;
|
|
 |
a858f4 |
unsigned int uc_mx_csr;
|
|
 |
a858f4 |
unsigned short uc_seg_cs;
|
|
 |
a858f4 |
unsigned short uc_seg_ds;
|
|
 |
a858f4 |
unsigned short uc_seg_es;
|
|
 |
a858f4 |
unsigned short uc_seg_fs;
|
|
 |
a858f4 |
unsigned short uc_seg_gs;
|
|
 |
a858f4 |
unsigned short uc_seg_ss;
|
|
 |
a858f4 |
unsigned int uc_eflags;
|
|
 |
a858f4 |
unsigned long uc_dr0;
|
|
 |
a858f4 |
unsigned long uc_dr1;
|
|
 |
a858f4 |
unsigned long uc_dr2;
|
|
 |
a858f4 |
unsigned long uc_dr3;
|
|
 |
a858f4 |
unsigned long uc_dr6;
|
|
 |
a858f4 |
unsigned long uc_dr7;
|
|
 |
a858f4 |
unsigned long uc_rax;
|
|
 |
a858f4 |
unsigned long uc_rcx;
|
|
 |
a858f4 |
unsigned long uc_rdx;
|
|
 |
a858f4 |
unsigned long uc_rbx;
|
|
 |
a858f4 |
unsigned long uc_rsp;
|
|
 |
a858f4 |
unsigned long uc_rbp;
|
|
 |
a858f4 |
unsigned long uc_rsi;
|
|
 |
a858f4 |
unsigned long uc_rdi;
|
|
 |
a858f4 |
unsigned long uc_r8;
|
|
 |
a858f4 |
unsigned long uc_r9;
|
|
 |
a858f4 |
unsigned long uc_r10;
|
|
 |
a858f4 |
unsigned long uc_r11;
|
|
 |
a858f4 |
unsigned long uc_r12;
|
|
 |
a858f4 |
unsigned long uc_r13;
|
|
 |
a858f4 |
unsigned long uc_r14;
|
|
 |
a858f4 |
unsigned long uc_r15;
|
|
 |
a858f4 |
unsigned long uc_rip;
|
|
 |
a858f4 |
|
|
 |
a858f4 |
union {
|
|
 |
a858f4 |
uc_xsave_fmt_t uc_flt_save;
|
|
 |
a858f4 |
|
|
 |
a858f4 |
struct {
|
|
 |
a858f4 |
uc_m128a_t uc_header[2];
|
|
 |
a858f4 |
uc_m128a_t uc_legacy[8];
|
|
 |
a858f4 |
} uc_hdr;
|
|
 |
a858f4 |
} uc_flt;
|
|
 |
a858f4 |
|
|
 |
a858f4 |
uc_m128a_t uc_xmm0;
|
|
 |
a858f4 |
uc_m128a_t uc_xmm1;
|
|
 |
a858f4 |
uc_m128a_t uc_xmm2;
|
|
 |
a858f4 |
uc_m128a_t uc_xmm3;
|
|
 |
a858f4 |
uc_m128a_t uc_xmm4;
|
|
 |
a858f4 |
uc_m128a_t uc_xmm5;
|
|
 |
a858f4 |
uc_m128a_t uc_xmm6;
|
|
 |
a858f4 |
uc_m128a_t uc_xmm7;
|
|
 |
a858f4 |
uc_m128a_t uc_xmm8;
|
|
 |
a858f4 |
uc_m128a_t uc_xmm9;
|
|
 |
a858f4 |
uc_m128a_t uc_xmm10;
|
|
 |
a858f4 |
uc_m128a_t uc_xmm11;
|
|
 |
a858f4 |
uc_m128a_t uc_xmm12;
|
|
 |
a858f4 |
uc_m128a_t uc_xmm13;
|
|
 |
a858f4 |
uc_m128a_t uc_xmm14;
|
|
 |
a858f4 |
uc_m128a_t uc_xmm15;
|
|
 |
a858f4 |
uc_m128a_t uc_vector_register[26];
|
|
 |
a858f4 |
unsigned long uc_vector_control;
|
|
 |
a858f4 |
unsigned long uc_debug_control;
|
|
 |
a858f4 |
unsigned long uc_last_branch_to_rip;
|
|
 |
a858f4 |
unsigned long uc_last_branch_from_rip;
|
|
 |
a858f4 |
unsigned long uc_last_exception_to_rip;
|
|
 |
a858f4 |
unsigned long uc_last_exception_from_rip;
|
|
 |
31aa57 |
unsigned long uc_reserved[6];
|
|
 |
87820a |
} mcontext_t;
|
|
 |
87820a |
|
|
 |
87820a |
struct sigaltstack {
|
|
 |
0c7e93 |
void * ss_sp;
|
|
 |
0c7e93 |
int ss_flags;
|
|
 |
0c7e93 |
size_t ss_size;
|
|
 |
87820a |
};
|
|
 |
87820a |
|
|
 |
87820a |
typedef struct __ucontext {
|
|
 |
afc9a8 |
unsigned int uc_csize;
|
|
 |
afc9a8 |
unsigned int uc_msize;
|
|
 |
afc9a8 |
unsigned int uc_pad[2];
|
|
 |
afc9a8 |
unsigned long uc_flags;
|
|
 |
afc9a8 |
unsigned long uc_opaquef[3];
|
|
 |
afc9a8 |
unsigned int uc_opaquec[8];
|
|
 |
afc9a8 |
unsigned long uc_reserved[32];
|
|
 |
afc9a8 |
unsigned long uc_align[2];
|
|
 |
afc9a8 |
stack_t uc_stack;
|
|
 |
afc9a8 |
struct __ucontext * uc_link;
|
|
 |
afc9a8 |
sigset_t uc_sigmask;
|
|
 |
afc9a8 |
mcontext_t uc_mcontext;
|
|
 |
87820a |
} ucontext_t;
|
|
 |
87820a |
|
|
 |
87820a |
#define SA_NOCLDSTOP 1
|
|
 |
87820a |
#define SA_NOCLDWAIT 2
|
|
 |
87820a |
#define SA_SIGINFO 4
|
|
 |
87820a |
#define SA_ONSTACK 0x08000000
|
|
 |
87820a |
#define SA_RESTART 0x10000000
|
|
 |
87820a |
#define SA_NODEFER 0x40000000
|
|
 |
87820a |
#define SA_RESETHAND 0x80000000
|
|
 |
87820a |
#define SA_RESTORER 0x04000000
|
|
 |
87820a |
|
|
 |
87820a |
#endif
|
|
 |
87820a |
|
|
 |
87820a |
#define SIGHUP 1
|
|
 |
87820a |
#define SIGINT 2
|
|
 |
87820a |
#define SIGQUIT 3
|
|
 |
87820a |
#define SIGILL 4
|
|
 |
87820a |
#define SIGTRAP 5
|
|
 |
87820a |
#define SIGABRT 6
|
|
 |
87820a |
#define SIGIOT SIGABRT
|
|
 |
87820a |
#define SIGBUS 7
|
|
 |
87820a |
#define SIGFPE 8
|
|
 |
87820a |
#define SIGKILL 9
|
|
 |
87820a |
#define SIGUSR1 10
|
|
 |
87820a |
#define SIGSEGV 11
|
|
 |
87820a |
#define SIGUSR2 12
|
|
 |
87820a |
#define SIGPIPE 13
|
|
 |
87820a |
#define SIGALRM 14
|
|
 |
87820a |
#define SIGTERM 15
|
|
 |
87820a |
#define SIGSTKFLT 16
|
|
 |
87820a |
#define SIGCHLD 17
|
|
 |
87820a |
#define SIGCONT 18
|
|
 |
87820a |
#define SIGSTOP 19
|
|
 |
87820a |
#define SIGTSTP 20
|
|
 |
87820a |
#define SIGTTIN 21
|
|
 |
87820a |
#define SIGTTOU 22
|
|
 |
87820a |
#define SIGURG 23
|
|
 |
87820a |
#define SIGXCPU 24
|
|
 |
87820a |
#define SIGXFSZ 25
|
|
 |
87820a |
#define SIGVTALRM 26
|
|
 |
87820a |
#define SIGPROF 27
|
|
 |
87820a |
#define SIGWINCH 28
|
|
 |
87820a |
#define SIGIO 29
|
|
 |
87820a |
#define SIGPOLL 29
|
|
 |
87820a |
#define SIGPWR 30
|
|
 |
87820a |
#define SIGSYS 31
|
|
 |
87820a |
#define SIGUNUSED SIGSYS
|
|
 |
87820a |
|
|
 |
87820a |
#define _NSIG 65
|
|
 |
87820a |
|