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