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 2048 | 5 #define MINSIGSTKSZ 2048 |
6 #define SIGSTKSZ 8192 | 6 #define SIGSTKSZ 8192 |
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 long greg_t, gregset_t[32]; | 10 typedef unsigned long long greg_t, gregset_t[32]; |
11 typedef struct { | 11 typedef struct { |
12 » union { | 12 union { |
13 » » double fp_dregs[32]; | 13 double fp_dregs[32]; |
14 » » struct { | 14 struct { |
15 » » » float _fp_fregs; | 15 float _fp_fregs; |
16 » » » unsigned _fp_pad; | 16 unsigned _fp_pad; |
17 » » } fp_fregs[32]; | 17 } fp_fregs[32]; |
18 » } fp_r; | 18 } fp_r; |
19 } fpregset_t; | 19 } fpregset_t; |
20 struct sigcontext | 20 struct sigcontext { |
21 { | 21 unsigned sc_regmask, sc_status; |
22 » unsigned sc_regmask, sc_status; | 22 unsigned long long sc_pc, sc_regs[32], sc_fpregs[32]; |
23 » unsigned long long sc_pc, sc_regs[32], sc_fpregs[32]; | 23 unsigned sc_ownedfp, sc_fpc_csr, sc_fpc_eir, sc_used_math, sc_dsp; |
24 » unsigned sc_ownedfp, sc_fpc_csr, sc_fpc_eir, sc_used_math, sc_dsp; | 24 unsigned long long sc_mdhi, sc_mdlo; |
25 » unsigned long long sc_mdhi, sc_mdlo; | 25 unsigned long sc_hi1, sc_lo1, sc_hi2, sc_lo2, sc_hi3, sc_lo3; |
26 » unsigned long sc_hi1, sc_lo1, sc_hi2, sc_lo2, sc_hi3, sc_lo3; | |
27 }; | 26 }; |
28 typedef struct | 27 typedef struct { |
29 { | 28 unsigned regmask, status; |
30 » unsigned regmask, status; | 29 unsigned long long pc, gregs[32], fpregs[32]; |
31 » unsigned long long pc, gregs[32], fpregs[32]; | 30 unsigned ownedfp, fpc_csr, fpc_eir, used_math, dsp; |
32 » unsigned ownedfp, fpc_csr, fpc_eir, used_math, dsp; | 31 unsigned long long mdhi, mdlo; |
33 » unsigned long long mdhi, mdlo; | 32 unsigned long hi1, lo1, hi2, lo2, hi3, lo3; |
34 » unsigned long hi1, lo1, hi2, lo2, hi3, lo3; | |
35 } mcontext_t; | 33 } mcontext_t; |
36 #else | 34 #else |
37 typedef struct { | 35 typedef struct { |
38 » unsigned __mc1[2]; | 36 unsigned __mc1[2]; |
39 » unsigned long long __mc2[65]; | 37 unsigned long long __mc2[65]; |
40 » unsigned __mc3[5]; | 38 unsigned __mc3[5]; |
41 » unsigned long long __mc4[2]; | 39 unsigned long long __mc4[2]; |
42 » unsigned __mc5[6]; | 40 unsigned __mc5[6]; |
43 } mcontext_t; | 41 } mcontext_t; |
44 #endif | 42 #endif |
45 | 43 |
46 struct sigaltstack { | 44 struct sigaltstack { |
47 » void *ss_sp; | 45 void* ss_sp; |
48 » size_t ss_size; | 46 size_t ss_size; |
49 » int ss_flags; | 47 int ss_flags; |
50 }; | 48 }; |
51 | 49 |
52 typedef struct __ucontext { | 50 typedef struct __ucontext { |
53 » unsigned long uc_flags; | 51 unsigned long uc_flags; |
54 » struct __ucontext *uc_link; | 52 struct __ucontext* uc_link; |
55 » stack_t uc_stack; | 53 stack_t uc_stack; |
56 » mcontext_t uc_mcontext; | 54 mcontext_t uc_mcontext; |
57 » sigset_t uc_sigmask; | 55 sigset_t uc_sigmask; |
58 } ucontext_t; | 56 } ucontext_t; |
59 | 57 |
60 #define SA_NOCLDSTOP 1 | 58 #define SA_NOCLDSTOP 1 |
61 #define SA_NOCLDWAIT 0x10000 | 59 #define SA_NOCLDWAIT 0x10000 |
62 #define SA_SIGINFO 8 | 60 #define SA_SIGINFO 8 |
63 #define SA_ONSTACK 0x08000000 | 61 #define SA_ONSTACK 0x08000000 |
64 #define SA_RESTART 0x10000000 | 62 #define SA_RESTART 0x10000000 |
65 #define SA_NODEFER 0x40000000 | 63 #define SA_NODEFER 0x40000000 |
66 #define SA_RESETHAND 0x80000000 | 64 #define SA_RESETHAND 0x80000000 |
67 #define SA_RESTORER 0x04000000 | 65 #define SA_RESTORER 0x04000000 |
68 | 66 |
69 #undef SIG_BLOCK | 67 #undef SIG_BLOCK |
70 #undef SIG_UNBLOCK | 68 #undef SIG_UNBLOCK |
71 #undef SIG_SETMASK | 69 #undef SIG_SETMASK |
72 #define SIG_BLOCK 1 | 70 #define SIG_BLOCK 1 |
73 #define SIG_UNBLOCK 2 | 71 #define SIG_UNBLOCK 2 |
74 #define SIG_SETMASK 3 | 72 #define SIG_SETMASK 3 |
75 | 73 |
76 #undef SI_ASYNCIO | 74 #undef SI_ASYNCIO |
77 #undef SI_MESGQ | 75 #undef SI_MESGQ |
78 #undef SI_TIMER | 76 #undef SI_TIMER |
79 #define SI_ASYNCIO (-2) | 77 #define SI_ASYNCIO (-2) |
80 #define SI_MESGQ (-4) | 78 #define SI_MESGQ (-4) |
81 #define SI_TIMER (-3) | 79 #define SI_TIMER (-3) |
82 | 80 |
83 #define __SI_SWAP_ERRNO_CODE | 81 #define __SI_SWAP_ERRNO_CODE |
84 | 82 |
85 #endif | 83 #endif |
86 | 84 |
87 #define SIGHUP 1 | 85 #define SIGHUP 1 |
88 #define SIGINT 2 | 86 #define SIGINT 2 |
89 #define SIGQUIT 3 | 87 #define SIGQUIT 3 |
90 #define SIGILL 4 | 88 #define SIGILL 4 |
91 #define SIGTRAP 5 | 89 #define SIGTRAP 5 |
92 #define SIGABRT 6 | 90 #define SIGABRT 6 |
93 #define SIGIOT SIGABRT | 91 #define SIGIOT SIGABRT |
94 #define SIGSTKFLT 7 | 92 #define SIGSTKFLT 7 |
95 #define SIGFPE 8 | 93 #define SIGFPE 8 |
96 #define SIGKILL 9 | 94 #define SIGKILL 9 |
97 #define SIGBUS 10 | 95 #define SIGBUS 10 |
98 #define SIGSEGV 11 | 96 #define SIGSEGV 11 |
99 #define SIGSYS 12 | 97 #define SIGSYS 12 |
100 #define SIGPIPE 13 | 98 #define SIGPIPE 13 |
101 #define SIGALRM 14 | 99 #define SIGALRM 14 |
102 #define SIGTERM 15 | 100 #define SIGTERM 15 |
103 #define SIGUSR1 16 | 101 #define SIGUSR1 16 |
104 #define SIGUSR2 17 | 102 #define SIGUSR2 17 |
105 #define SIGCHLD 18 | 103 #define SIGCHLD 18 |
106 #define SIGPWR 19 | 104 #define SIGPWR 19 |
107 #define SIGWINCH 20 | 105 #define SIGWINCH 20 |
108 #define SIGURG 21 | 106 #define SIGURG 21 |
109 #define SIGIO 22 | 107 #define SIGIO 22 |
110 #define SIGPOLL SIGIO | 108 #define SIGPOLL SIGIO |
111 #define SIGSTOP 23 | 109 #define SIGSTOP 23 |
112 #define SIGTSTP 24 | 110 #define SIGTSTP 24 |
113 #define SIGCONT 25 | 111 #define SIGCONT 25 |
114 #define SIGTTIN 26 | 112 #define SIGTTIN 26 |
115 #define SIGTTOU 27 | 113 #define SIGTTOU 27 |
116 #define SIGVTALRM 28 | 114 #define SIGVTALRM 28 |
117 #define SIGPROF 29 | 115 #define SIGPROF 29 |
118 #define SIGXCPU 30 | 116 #define SIGXCPU 30 |
119 #define SIGXFSZ 31 | 117 #define SIGXFSZ 31 |
120 #define SIGUNUSED SIGSYS | 118 #define SIGUNUSED SIGSYS |
121 | 119 |
122 #define _NSIG 128 | 120 #define _NSIG 128 |
OLD | NEW |