OLD | NEW |
1 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ | 1 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || \ |
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | 2 defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
3 | 3 |
4 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | 4 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
5 #define MINSIGSTKSZ 6144 | 5 #define MINSIGSTKSZ 6144 |
6 #define SIGSTKSZ 12288 | 6 #define SIGSTKSZ 12288 |
7 #endif | 7 #endif |
8 | 8 |
9 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | 9 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
10 typedef unsigned long greg_t; | 10 typedef unsigned long greg_t; |
11 typedef unsigned long gregset_t[34]; | 11 typedef unsigned long gregset_t[34]; |
12 | 12 |
13 typedef struct { | 13 typedef struct { |
14 » long double vregs[32]; | 14 long double vregs[32]; |
15 » unsigned int fpsr; | 15 unsigned int fpsr; |
16 » unsigned int fpcr; | 16 unsigned int fpcr; |
17 } fpregset_t; | 17 } fpregset_t; |
18 typedef struct sigcontext | 18 typedef struct sigcontext { |
19 { | 19 unsigned long fault_address; |
20 » unsigned long fault_address; | 20 unsigned long regs[31]; |
21 » unsigned long regs[31]; | 21 unsigned long sp, pc, pstate; |
22 » unsigned long sp, pc, pstate; | 22 long double __reserved[256]; |
23 » long double __reserved[256]; | |
24 } mcontext_t; | 23 } mcontext_t; |
25 | 24 |
26 #define FPSIMD_MAGIC 0x46508001 | 25 #define FPSIMD_MAGIC 0x46508001 |
27 #define ESR_MAGIC 0x45535201 | 26 #define ESR_MAGIC 0x45535201 |
28 struct _aarch64_ctx { | 27 struct _aarch64_ctx { |
29 » unsigned int magic; | 28 unsigned int magic; |
30 » unsigned int size; | 29 unsigned int size; |
31 }; | 30 }; |
32 struct fpsimd_context { | 31 struct fpsimd_context { |
33 » struct _aarch64_ctx head; | 32 struct _aarch64_ctx head; |
34 » unsigned int fpsr; | 33 unsigned int fpsr; |
35 » unsigned int fpcr; | 34 unsigned int fpcr; |
36 » long double vregs[32]; | 35 long double vregs[32]; |
37 }; | 36 }; |
38 struct esr_context { | 37 struct esr_context { |
39 » struct _aarch64_ctx head; | 38 struct _aarch64_ctx head; |
40 » unsigned long esr; | 39 unsigned long esr; |
41 }; | 40 }; |
42 #else | 41 #else |
43 typedef struct { | 42 typedef struct { long double __regs[18 + 256]; } mcontext_t; |
44 » long double __regs[18+256]; | |
45 } mcontext_t; | |
46 #endif | 43 #endif |
47 | 44 |
48 struct sigaltstack { | 45 struct sigaltstack { |
49 » void *ss_sp; | 46 void* ss_sp; |
50 » int ss_flags; | 47 int ss_flags; |
51 » size_t ss_size; | 48 size_t ss_size; |
52 }; | 49 }; |
53 | 50 |
54 typedef struct __ucontext { | 51 typedef struct __ucontext { |
55 » unsigned long uc_flags; | 52 unsigned long uc_flags; |
56 » struct ucontext *uc_link; | 53 struct ucontext* uc_link; |
57 » stack_t uc_stack; | 54 stack_t uc_stack; |
58 » sigset_t uc_sigmask; | 55 sigset_t uc_sigmask; |
59 » mcontext_t uc_mcontext; | 56 mcontext_t uc_mcontext; |
60 } ucontext_t; | 57 } ucontext_t; |
61 | 58 |
62 #define SA_NOCLDSTOP 1 | 59 #define SA_NOCLDSTOP 1 |
63 #define SA_NOCLDWAIT 2 | 60 #define SA_NOCLDWAIT 2 |
64 #define SA_SIGINFO 4 | 61 #define SA_SIGINFO 4 |
65 #define SA_ONSTACK 0x08000000 | 62 #define SA_ONSTACK 0x08000000 |
66 #define SA_RESTART 0x10000000 | 63 #define SA_RESTART 0x10000000 |
67 #define SA_NODEFER 0x40000000 | 64 #define SA_NODEFER 0x40000000 |
68 #define SA_RESETHAND 0x80000000 | 65 #define SA_RESETHAND 0x80000000 |
69 #define SA_RESTORER 0x04000000 | 66 #define SA_RESTORER 0x04000000 |
70 | 67 |
71 #endif | 68 #endif |
72 | 69 |
73 #define SIGHUP 1 | 70 #define SIGHUP 1 |
74 #define SIGINT 2 | 71 #define SIGINT 2 |
75 #define SIGQUIT 3 | 72 #define SIGQUIT 3 |
76 #define SIGILL 4 | 73 #define SIGILL 4 |
77 #define SIGTRAP 5 | 74 #define SIGTRAP 5 |
78 #define SIGABRT 6 | 75 #define SIGABRT 6 |
79 #define SIGIOT SIGABRT | 76 #define SIGIOT SIGABRT |
80 #define SIGBUS 7 | 77 #define SIGBUS 7 |
81 #define SIGFPE 8 | 78 #define SIGFPE 8 |
82 #define SIGKILL 9 | 79 #define SIGKILL 9 |
83 #define SIGUSR1 10 | 80 #define SIGUSR1 10 |
84 #define SIGSEGV 11 | 81 #define SIGSEGV 11 |
85 #define SIGUSR2 12 | 82 #define SIGUSR2 12 |
86 #define SIGPIPE 13 | 83 #define SIGPIPE 13 |
87 #define SIGALRM 14 | 84 #define SIGALRM 14 |
88 #define SIGTERM 15 | 85 #define SIGTERM 15 |
89 #define SIGSTKFLT 16 | 86 #define SIGSTKFLT 16 |
90 #define SIGCHLD 17 | 87 #define SIGCHLD 17 |
91 #define SIGCONT 18 | 88 #define SIGCONT 18 |
92 #define SIGSTOP 19 | 89 #define SIGSTOP 19 |
93 #define SIGTSTP 20 | 90 #define SIGTSTP 20 |
94 #define SIGTTIN 21 | 91 #define SIGTTIN 21 |
95 #define SIGTTOU 22 | 92 #define SIGTTOU 22 |
96 #define SIGURG 23 | 93 #define SIGURG 23 |
97 #define SIGXCPU 24 | 94 #define SIGXCPU 24 |
98 #define SIGXFSZ 25 | 95 #define SIGXFSZ 25 |
99 #define SIGVTALRM 26 | 96 #define SIGVTALRM 26 |
100 #define SIGPROF 27 | 97 #define SIGPROF 27 |
101 #define SIGWINCH 28 | 98 #define SIGWINCH 28 |
102 #define SIGIO 29 | 99 #define SIGIO 29 |
103 #define SIGPOLL 29 | 100 #define SIGPOLL 29 |
104 #define SIGPWR 30 | 101 #define SIGPWR 30 |
105 #define SIGSYS 31 | 102 #define SIGSYS 31 |
106 #define SIGUNUSED SIGSYS | 103 #define SIGUNUSED SIGSYS |
107 | 104 |
108 #define _NSIG 65 | 105 #define _NSIG 65 |
OLD | NEW |