1 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
4 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
5 #define MINSIGSTKSZ 2048
15 #define REG_R10 REG_R10
17 #define REG_R11 REG_R11
19 #define REG_R12 REG_R12
21 #define REG_R13 REG_R13
23 #define REG_R14 REG_R14
25 #define REG_R15 REG_R15
27 #define REG_RDI REG_RDI
29 #define REG_RSI REG_RSI
30 enum { REG_RBP = 10 };
31 #define REG_RBP REG_RBP
32 enum { REG_RBX = 11 };
33 #define REG_RBX REG_RBX
34 enum { REG_RDX = 12 };
35 #define REG_RDX REG_RDX
36 enum { REG_RAX = 13 };
37 #define REG_RAX REG_RAX
38 enum { REG_RCX = 14 };
39 #define REG_RCX REG_RCX
40 enum { REG_RSP = 15 };
41 #define REG_RSP REG_RSP
42 enum { REG_RIP = 16 };
43 #define REG_RIP REG_RIP
44 enum { REG_EFL = 17 };
45 #define REG_EFL REG_EFL
46 enum { REG_CSGSFS = 18 };
47 #define REG_CSGSFS REG_CSGSFS
48 enum { REG_ERR = 19 };
49 #define REG_ERR REG_ERR
50 enum { REG_TRAPNO = 20 };
51 #define REG_TRAPNO REG_TRAPNO
52 enum { REG_OLDMASK = 21 };
53 #define REG_OLDMASK REG_OLDMASK
54 enum { REG_CR2 = 22 };
55 #define REG_CR2 REG_CR2
58 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
59 typedef long long greg_t, gregset_t[23];
60 typedef struct _fpstate {
61 unsigned short cwd, swd, ftw, fop;
62 unsigned long long rip, rdp;
63 unsigned mxcsr, mxcr_mask;
65 unsigned short significand[4], exponent, padding[3];
73 unsigned long r8, r9, r10, r11, r12, r13, r14, r15;
74 unsigned long rdi, rsi, rbp, rbx, rdx, rax, rcx, rsp, rip, eflags;
75 unsigned short cs, gs, fs, __pad0;
76 unsigned long err, trapno, oldmask, cr2;
77 struct _fpstate *fpstate;
78 unsigned long __reserved1[8];
83 unsigned long long __reserved1[8];
87 unsigned long __space[32];
97 typedef struct __ucontext {
98 unsigned long uc_flags;
99 struct __ucontext *uc_link;
101 mcontext_t uc_mcontext;
103 unsigned long __fpregs_mem[64];
106 #define SA_NOCLDSTOP 1
107 #define SA_NOCLDWAIT 2
109 #define SA_ONSTACK 0x08000000
110 #define SA_RESTART 0x10000000
111 #define SA_NODEFER 0x40000000
112 #define SA_RESETHAND 0x80000000
113 #define SA_RESTORER 0x04000000
123 #define SIGIOT SIGABRT
150 #define SIGUNUSED SIGSYS