]>
Commit | Line | Data |
---|---|---|
a992f506 | 1 | /* siginfo constants. Linux version. |
688903eb | 2 | Copyright (C) 1997-2018 Free Software Foundation, Inc. |
cbdee279 UD |
3 | This file is part of the GNU C Library. |
4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | |
41bdb6e2 AJ |
6 | modify it under the terms of the GNU Lesser General Public |
7 | License as published by the Free Software Foundation; either | |
8 | version 2.1 of the License, or (at your option) any later version. | |
cbdee279 UD |
9 | |
10 | The GNU C Library is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
41bdb6e2 | 13 | Lesser General Public License for more details. |
cbdee279 | 14 | |
41bdb6e2 | 15 | You should have received a copy of the GNU Lesser General Public |
59ba27a6 PE |
16 | License along with the GNU C Library; if not, see |
17 | <http://www.gnu.org/licenses/>. */ | |
cbdee279 | 18 | |
a992f506 ZW |
19 | #ifndef _BITS_SIGINFO_CONSTS_H |
20 | #define _BITS_SIGINFO_CONSTS_H 1 | |
cbdee279 | 21 | |
a992f506 ZW |
22 | #ifndef _SIGNAL_H |
23 | #error "Don't include <bits/siginfo-consts.h> directly; use <signal.h> instead." | |
2ace5721 UD |
24 | #endif |
25 | ||
a992f506 ZW |
26 | /* Most of these constants are uniform across all architectures, but there |
27 | is one exception. */ | |
a992f506 | 28 | #include <bits/siginfo-arch.h> |
231a59ce ZW |
29 | #ifndef __SI_ASYNCIO_AFTER_SIGIO |
30 | # define __SI_ASYNCIO_AFTER_SIGIO 1 | |
31 | #endif | |
cbdee279 UD |
32 | |
33 | /* Values for `si_code'. Positive values are reserved for kernel-generated | |
34 | signals. */ | |
35 | enum | |
36 | { | |
a992f506 ZW |
37 | SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */ |
38 | SI_TKILL = -6, /* Sent by tkill. */ | |
39 | SI_SIGIO, /* Sent by queued SIGIO. */ | |
40 | #if __SI_ASYNCIO_AFTER_SIGIO | |
41 | SI_ASYNCIO, /* Sent by AIO completion. */ | |
cbdee279 | 42 | SI_MESGQ, /* Sent by real time mesq state change. */ |
cbdee279 | 43 | SI_TIMER, /* Sent by timer expiration. */ |
a992f506 ZW |
44 | #else |
45 | SI_MESGQ, | |
46 | SI_TIMER, | |
47 | SI_ASYNCIO, | |
48 | #endif | |
cbdee279 | 49 | SI_QUEUE, /* Sent by sigqueue. */ |
a992f506 ZW |
50 | SI_USER, /* Sent by kill, sigsend. */ |
51 | SI_KERNEL = 0x80 /* Send by kernel. */ | |
52 | ||
53 | #define SI_ASYNCNL SI_ASYNCNL | |
54 | #define SI_TKILL SI_TKILL | |
55 | #define SI_SIGIO SI_SIGIO | |
56 | #define SI_ASYNCIO SI_ASYNCIO | |
57 | #define SI_MESGQ SI_MESGQ | |
58 | #define SI_TIMER SI_TIMER | |
59 | #define SI_ASYNCIO SI_ASYNCIO | |
60 | #define SI_QUEUE SI_QUEUE | |
61 | #define SI_USER SI_USER | |
62 | #define SI_KERNEL SI_KERNEL | |
cbdee279 UD |
63 | }; |
64 | ||
65 | ||
5c780849 | 66 | # if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 |
cbdee279 UD |
67 | /* `si_code' values for SIGILL signal. */ |
68 | enum | |
69 | { | |
70 | ILL_ILLOPC = 1, /* Illegal opcode. */ | |
5c780849 | 71 | # define ILL_ILLOPC ILL_ILLOPC |
1f8f2b60 | 72 | ILL_ILLOPN, /* Illegal operand. */ |
5c780849 | 73 | # define ILL_ILLOPN ILL_ILLOPN |
cbdee279 | 74 | ILL_ILLADR, /* Illegal addressing mode. */ |
5c780849 | 75 | # define ILL_ILLADR ILL_ILLADR |
cbdee279 | 76 | ILL_ILLTRP, /* Illegal trap. */ |
5c780849 | 77 | # define ILL_ILLTRP ILL_ILLTRP |
cbdee279 | 78 | ILL_PRVOPC, /* Privileged opcode. */ |
5c780849 | 79 | # define ILL_PRVOPC ILL_PRVOPC |
cbdee279 | 80 | ILL_PRVREG, /* Privileged register. */ |
5c780849 | 81 | # define ILL_PRVREG ILL_PRVREG |
cbdee279 | 82 | ILL_COPROC, /* Coprocessor error. */ |
5c780849 | 83 | # define ILL_COPROC ILL_COPROC |
cbdee279 | 84 | ILL_BADSTK /* Internal stack error. */ |
5c780849 | 85 | # define ILL_BADSTK ILL_BADSTK |
cbdee279 UD |
86 | }; |
87 | ||
88 | /* `si_code' values for SIGFPE signal. */ | |
89 | enum | |
90 | { | |
91 | FPE_INTDIV = 1, /* Integer divide by zero. */ | |
5c780849 | 92 | # define FPE_INTDIV FPE_INTDIV |
cbdee279 | 93 | FPE_INTOVF, /* Integer overflow. */ |
5c780849 | 94 | # define FPE_INTOVF FPE_INTOVF |
cbdee279 | 95 | FPE_FLTDIV, /* Floating point divide by zero. */ |
5c780849 | 96 | # define FPE_FLTDIV FPE_FLTDIV |
cbdee279 | 97 | FPE_FLTOVF, /* Floating point overflow. */ |
5c780849 | 98 | # define FPE_FLTOVF FPE_FLTOVF |
cbdee279 | 99 | FPE_FLTUND, /* Floating point underflow. */ |
5c780849 | 100 | # define FPE_FLTUND FPE_FLTUND |
cbdee279 | 101 | FPE_FLTRES, /* Floating point inexact result. */ |
5c780849 | 102 | # define FPE_FLTRES FPE_FLTRES |
cbdee279 | 103 | FPE_FLTINV, /* Floating point invalid operation. */ |
5c780849 | 104 | # define FPE_FLTINV FPE_FLTINV |
cbdee279 | 105 | FPE_FLTSUB /* Subscript out of range. */ |
5c780849 | 106 | # define FPE_FLTSUB FPE_FLTSUB |
cbdee279 UD |
107 | }; |
108 | ||
109 | /* `si_code' values for SIGSEGV signal. */ | |
110 | enum | |
111 | { | |
112 | SEGV_MAPERR = 1, /* Address not mapped to object. */ | |
5c780849 | 113 | # define SEGV_MAPERR SEGV_MAPERR |
446d22e9 | 114 | SEGV_ACCERR, /* Invalid permissions for mapped object. */ |
5c780849 | 115 | # define SEGV_ACCERR SEGV_ACCERR |
446d22e9 FW |
116 | SEGV_BNDERR, /* Bounds checking failure. */ |
117 | # define SEGV_BNDERR SEGV_BNDERR | |
118 | SEGV_PKUERR /* Protection key checking failure. */ | |
119 | # define SEGV_PKUERR SEGV_PKUERR | |
cbdee279 UD |
120 | }; |
121 | ||
122 | /* `si_code' values for SIGBUS signal. */ | |
123 | enum | |
124 | { | |
125 | BUS_ADRALN = 1, /* Invalid address alignment. */ | |
5c780849 | 126 | # define BUS_ADRALN BUS_ADRALN |
cbdee279 | 127 | BUS_ADRERR, /* Non-existant physical address. */ |
5c780849 | 128 | # define BUS_ADRERR BUS_ADRERR |
a992f506 | 129 | BUS_OBJERR, /* Object specific hardware error. */ |
5c780849 | 130 | # define BUS_OBJERR BUS_OBJERR |
a992f506 ZW |
131 | BUS_MCEERR_AR, /* Hardware memory error: action required. */ |
132 | # define BUS_MCEERR_AR BUS_MCEERR_AR | |
133 | BUS_MCEERR_AO /* Hardware memory error: action optional. */ | |
134 | # define BUS_MCEERR_AO BUS_MCEERR_AO | |
cbdee279 | 135 | }; |
5c780849 | 136 | # endif |
cbdee279 | 137 | |
5c780849 | 138 | # ifdef __USE_XOPEN_EXTENDED |
cbdee279 UD |
139 | /* `si_code' values for SIGTRAP signal. */ |
140 | enum | |
141 | { | |
142 | TRAP_BRKPT = 1, /* Process breakpoint. */ | |
5c780849 | 143 | # define TRAP_BRKPT TRAP_BRKPT |
cbdee279 | 144 | TRAP_TRACE /* Process trace trap. */ |
5c780849 | 145 | # define TRAP_TRACE TRAP_TRACE |
cbdee279 | 146 | }; |
5c780849 | 147 | # endif |
cbdee279 | 148 | |
5c780849 | 149 | # if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 |
cbdee279 UD |
150 | /* `si_code' values for SIGCHLD signal. */ |
151 | enum | |
152 | { | |
153 | CLD_EXITED = 1, /* Child has exited. */ | |
5c780849 | 154 | # define CLD_EXITED CLD_EXITED |
cbdee279 | 155 | CLD_KILLED, /* Child was killed. */ |
5c780849 | 156 | # define CLD_KILLED CLD_KILLED |
cbdee279 | 157 | CLD_DUMPED, /* Child terminated abnormally. */ |
5c780849 | 158 | # define CLD_DUMPED CLD_DUMPED |
cbdee279 | 159 | CLD_TRAPPED, /* Traced child has trapped. */ |
5c780849 | 160 | # define CLD_TRAPPED CLD_TRAPPED |
cbdee279 | 161 | CLD_STOPPED, /* Child has stopped. */ |
5c780849 | 162 | # define CLD_STOPPED CLD_STOPPED |
cbdee279 | 163 | CLD_CONTINUED /* Stopped child has continued. */ |
5c780849 | 164 | # define CLD_CONTINUED CLD_CONTINUED |
cbdee279 UD |
165 | }; |
166 | ||
167 | /* `si_code' values for SIGPOLL signal. */ | |
168 | enum | |
169 | { | |
170 | POLL_IN = 1, /* Data input available. */ | |
5c780849 | 171 | # define POLL_IN POLL_IN |
cbdee279 | 172 | POLL_OUT, /* Output buffers available. */ |
5c780849 | 173 | # define POLL_OUT POLL_OUT |
cbdee279 | 174 | POLL_MSG, /* Input message available. */ |
5c780849 | 175 | # define POLL_MSG POLL_MSG |
cbdee279 | 176 | POLL_ERR, /* I/O error. */ |
5c780849 | 177 | # define POLL_ERR POLL_ERR |
cbdee279 | 178 | POLL_PRI, /* High priority input available. */ |
5c780849 | 179 | # define POLL_PRI POLL_PRI |
cbdee279 | 180 | POLL_HUP /* Device disconnected. */ |
5c780849 | 181 | # define POLL_HUP POLL_HUP |
cbdee279 | 182 | }; |
5c780849 | 183 | # endif |
cbdee279 | 184 | |
a992f506 ZW |
185 | /* Architectures might also add architecture-specific constants. |
186 | These are all considered GNU extensions. */ | |
187 | #ifdef __USE_GNU | |
188 | # include <bits/siginfo-consts-arch.h> | |
189 | #endif | |
bd355af0 | 190 | |
a992f506 | 191 | #endif |