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 4096 | 5 #define MINSIGSTKSZ 4096 |
6 #define SIGSTKSZ 10240 | 6 #define SIGSTKSZ 10240 |
7 #endif | 7 #endif |
8 | 8 |
9 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | 9 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
10 | 10 |
11 typedef unsigned long greg_t, gregset_t[48]; | 11 typedef unsigned long greg_t, gregset_t[48]; |
12 | 12 |
13 typedef struct { | 13 typedef struct { |
14 » double fpregs[32]; | 14 double fpregs[32]; |
15 » double fpscr; | 15 double fpscr; |
16 » unsigned _pad[2]; | 16 unsigned _pad[2]; |
17 } fpregset_t; | 17 } fpregset_t; |
18 | 18 |
19 typedef struct { | 19 typedef struct { |
20 » unsigned vrregs[32][4]; | 20 unsigned vrregs[32][4]; |
21 » unsigned vrsave; | 21 unsigned vrsave; |
22 » unsigned _pad[2]; | 22 unsigned _pad[2]; |
23 » unsigned vscr; | 23 unsigned vscr; |
24 } vrregset_t; | 24 } vrregset_t; |
25 | 25 |
26 struct sigcontext | 26 struct sigcontext { |
27 { | 27 unsigned long _unused[4]; |
28 » unsigned long _unused[4]; | 28 int signal; |
29 » int signal; | 29 unsigned long handler; |
30 » unsigned long handler; | 30 unsigned long oldmask; |
31 » unsigned long oldmask; | 31 void* regs; |
32 » void *regs; | |
33 }; | 32 }; |
34 | 33 |
35 typedef struct { | 34 typedef struct { |
36 » gregset_t gregs; | 35 gregset_t gregs; |
37 » fpregset_t fpregs; | 36 fpregset_t fpregs; |
38 » vrregset_t vrregs | 37 vrregset_t vrregs |
39 #ifdef __GNUC__ | 38 #ifdef __GNUC__ |
40 » __attribute__((__aligned__(16))) | 39 __attribute__((__aligned__(16))) |
41 #endif | 40 #endif |
42 » ; | 41 ; |
43 } mcontext_t; | 42 } mcontext_t; |
44 | 43 |
45 #else | 44 #else |
46 | 45 |
47 typedef struct { | 46 typedef struct { |
48 » long __regs[48+68+4*32+4] | 47 long __regs[48 + 68 + 4 * 32 + 4] |
49 #ifdef __GNUC__ | 48 #ifdef __GNUC__ |
50 » __attribute__((__aligned__(16))) | 49 __attribute__((__aligned__(16))) |
51 #endif | 50 #endif |
52 » ; | 51 ; |
53 } mcontext_t; | 52 } mcontext_t; |
54 | 53 |
55 #endif | 54 #endif |
56 | 55 |
57 struct sigaltstack { | 56 struct sigaltstack { |
58 » void *ss_sp; | 57 void* ss_sp; |
59 » int ss_flags; | 58 int ss_flags; |
60 » size_t ss_size; | 59 size_t ss_size; |
61 }; | 60 }; |
62 | 61 |
63 typedef struct __ucontext { | 62 typedef struct __ucontext { |
64 » unsigned long uc_flags; | 63 unsigned long uc_flags; |
65 » struct __ucontext *uc_link; | 64 struct __ucontext* uc_link; |
66 » stack_t uc_stack; | 65 stack_t uc_stack; |
67 » int uc_pad[7]; | 66 int uc_pad[7]; |
68 » mcontext_t *uc_regs; | 67 mcontext_t* uc_regs; |
69 » sigset_t uc_sigmask; | 68 sigset_t uc_sigmask; |
70 int uc_pad2[3]; | 69 int uc_pad2[3]; |
71 » mcontext_t uc_mcontext; | 70 mcontext_t uc_mcontext; |
72 } ucontext_t; | 71 } ucontext_t; |
73 | 72 |
74 #define SA_NOCLDSTOP 1U | 73 #define SA_NOCLDSTOP 1U |
75 #define SA_NOCLDWAIT 2U | 74 #define SA_NOCLDWAIT 2U |
76 #define SA_SIGINFO 4U | 75 #define SA_SIGINFO 4U |
77 #define SA_ONSTACK 0x08000000U | 76 #define SA_ONSTACK 0x08000000U |
78 #define SA_RESTART 0x10000000U | 77 #define SA_RESTART 0x10000000U |
79 #define SA_NODEFER 0x40000000U | 78 #define SA_NODEFER 0x40000000U |
80 #define SA_RESETHAND 0x80000000U | 79 #define SA_RESETHAND 0x80000000U |
81 #define SA_RESTORER 0x04000000U | 80 #define SA_RESTORER 0x04000000U |
82 | 81 |
83 #endif | 82 #endif |
84 | 83 |
85 #define SIGHUP 1 | 84 #define SIGHUP 1 |
86 #define SIGINT 2 | 85 #define SIGINT 2 |
87 #define SIGQUIT 3 | 86 #define SIGQUIT 3 |
88 #define SIGILL 4 | 87 #define SIGILL 4 |
89 #define SIGTRAP 5 | 88 #define SIGTRAP 5 |
90 #define SIGABRT 6 | 89 #define SIGABRT 6 |
91 #define SIGIOT SIGABRT | 90 #define SIGIOT SIGABRT |
92 #define SIGBUS 7 | 91 #define SIGBUS 7 |
93 #define SIGFPE 8 | 92 #define SIGFPE 8 |
94 #define SIGKILL 9 | 93 #define SIGKILL 9 |
95 #define SIGUSR1 10 | 94 #define SIGUSR1 10 |
96 #define SIGSEGV 11 | 95 #define SIGSEGV 11 |
97 #define SIGUSR2 12 | 96 #define SIGUSR2 12 |
98 #define SIGPIPE 13 | 97 #define SIGPIPE 13 |
99 #define SIGALRM 14 | 98 #define SIGALRM 14 |
100 #define SIGTERM 15 | 99 #define SIGTERM 15 |
101 #define SIGSTKFLT 16 | 100 #define SIGSTKFLT 16 |
102 #define SIGCHLD 17 | 101 #define SIGCHLD 17 |
103 #define SIGCONT 18 | 102 #define SIGCONT 18 |
104 #define SIGSTOP 19 | 103 #define SIGSTOP 19 |
105 #define SIGTSTP 20 | 104 #define SIGTSTP 20 |
106 #define SIGTTIN 21 | 105 #define SIGTTIN 21 |
107 #define SIGTTOU 22 | 106 #define SIGTTOU 22 |
108 #define SIGURG 23 | 107 #define SIGURG 23 |
109 #define SIGXCPU 24 | 108 #define SIGXCPU 24 |
110 #define SIGXFSZ 25 | 109 #define SIGXFSZ 25 |
111 #define SIGVTALRM 26 | 110 #define SIGVTALRM 26 |
112 #define SIGPROF 27 | 111 #define SIGPROF 27 |
113 #define SIGWINCH 28 | 112 #define SIGWINCH 28 |
114 #define SIGIO 29 | 113 #define SIGIO 29 |
115 #define SIGPOLL 29 | 114 #define SIGPOLL 29 |
116 #define SIGPWR 30 | 115 #define SIGPWR 30 |
117 #define SIGSYS 31 | 116 #define SIGSYS 31 |
118 #define SIGUNUSED SIGSYS | 117 #define SIGUNUSED SIGSYS |
119 | 118 |
120 #define _NSIG 65 | 119 #define _NSIG 65 |
OLD | NEW |