1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _UAPI_ASM_GENERIC_SIGINFO_H
20 #define _UAPI_ASM_GENERIC_SIGINFO_H
21 #include <linux/compiler.h>
22 #include <linux/types.h>
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 typedef union sigval {
25   int sival_int;
26   void __user * sival_ptr;
27 } sigval_t;
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #ifndef __ARCH_SI_PREAMBLE_SIZE
30 #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
31 #endif
32 #define SI_MAX_SIZE 128
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 #ifndef SI_PAD_SIZE
35 #define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
36 #endif
37 #ifndef __ARCH_SI_UID_T
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 #define __ARCH_SI_UID_T __kernel_uid32_t
40 #endif
41 #ifndef __ARCH_SI_BAND_T
42 #define __ARCH_SI_BAND_T long
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 #endif
45 #ifndef __ARCH_SI_CLOCK_T
46 #define __ARCH_SI_CLOCK_T __kernel_clock_t
47 #endif
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 #ifndef __ARCH_SI_ATTRIBUTES
50 #define __ARCH_SI_ATTRIBUTES
51 #endif
52 #ifndef HAVE_ARCH_SIGINFO_T
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 typedef struct siginfo {
55   int si_signo;
56   int si_errno;
57   int si_code;
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59   union {
60     int _pad[SI_PAD_SIZE];
61     struct {
62       __kernel_pid_t _pid;
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64       __ARCH_SI_UID_T _uid;
65     } _kill;
66     struct {
67       __kernel_timer_t _tid;
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69       int _overrun;
70       char _pad[sizeof(__ARCH_SI_UID_T) - sizeof(int)];
71       sigval_t _sigval;
72       int _sys_private;
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74     } _timer;
75     struct {
76       __kernel_pid_t _pid;
77       __ARCH_SI_UID_T _uid;
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79       sigval_t _sigval;
80     } _rt;
81     struct {
82       __kernel_pid_t _pid;
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84       __ARCH_SI_UID_T _uid;
85       int _status;
86       __ARCH_SI_CLOCK_T _utime;
87       __ARCH_SI_CLOCK_T _stime;
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89     } _sigchld;
90     struct {
91       void __user * _addr;
92 #ifdef __ARCH_SI_TRAPNO
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94       int _trapno;
95 #endif
96       short _addr_lsb;
97       union {
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99         struct {
100           void __user * _lower;
101           void __user * _upper;
102         } _addr_bnd;
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104         __u32 _pkey;
105       };
106     } _sigfault;
107     struct {
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109       __ARCH_SI_BAND_T _band;
110       int _fd;
111     } _sigpoll;
112     struct {
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114       void __user * _call_addr;
115       int _syscall;
116       unsigned int _arch;
117     } _sigsys;
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119   } _sifields;
120 } __ARCH_SI_ATTRIBUTES siginfo_t;
121 #define __ARCH_SIGSYS
122 #endif
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 #define si_pid _sifields._kill._pid
125 #define si_uid _sifields._kill._uid
126 #define si_tid _sifields._timer._tid
127 #define si_overrun _sifields._timer._overrun
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 #define si_sys_private _sifields._timer._sys_private
130 #define si_status _sifields._sigchld._status
131 #define si_utime _sifields._sigchld._utime
132 #define si_stime _sifields._sigchld._stime
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134 #define si_value _sifields._rt._sigval
135 #define si_int _sifields._rt._sigval.sival_int
136 #define si_ptr _sifields._rt._sigval.sival_ptr
137 #define si_addr _sifields._sigfault._addr
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139 #ifdef __ARCH_SI_TRAPNO
140 #define si_trapno _sifields._sigfault._trapno
141 #endif
142 #define si_addr_lsb _sifields._sigfault._addr_lsb
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144 #define si_lower _sifields._sigfault._addr_bnd._lower
145 #define si_upper _sifields._sigfault._addr_bnd._upper
146 #define si_pkey _sifields._sigfault._pkey
147 #define si_band _sifields._sigpoll._band
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149 #define si_fd _sifields._sigpoll._fd
150 #ifdef __ARCH_SIGSYS
151 #define si_call_addr _sifields._sigsys._call_addr
152 #define si_syscall _sifields._sigsys._syscall
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154 #define si_arch _sifields._sigsys._arch
155 #endif
156 #define __SI_KILL 0
157 #define __SI_TIMER 0
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159 #define __SI_POLL 0
160 #define __SI_FAULT 0
161 #define __SI_CHLD 0
162 #define __SI_RT 0
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164 #define __SI_MESGQ 0
165 #define __SI_SYS 0
166 #define __SI_CODE(T,N) (N)
167 #define SI_USER 0
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169 #define SI_KERNEL 0x80
170 #define SI_QUEUE - 1
171 #define SI_TIMER __SI_CODE(__SI_TIMER, - 2)
172 #define SI_MESGQ __SI_CODE(__SI_MESGQ, - 3)
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174 #define SI_ASYNCIO - 4
175 #define SI_SIGIO - 5
176 #define SI_TKILL - 6
177 #define SI_DETHREAD - 7
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179 #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
180 #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
181 #define ILL_ILLOPC (__SI_FAULT | 1)
182 #define ILL_ILLOPN (__SI_FAULT | 2)
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184 #define ILL_ILLADR (__SI_FAULT | 3)
185 #define ILL_ILLTRP (__SI_FAULT | 4)
186 #define ILL_PRVOPC (__SI_FAULT | 5)
187 #define ILL_PRVREG (__SI_FAULT | 6)
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189 #define ILL_COPROC (__SI_FAULT | 7)
190 #define ILL_BADSTK (__SI_FAULT | 8)
191 #define NSIGILL 8
192 #define FPE_INTDIV (__SI_FAULT | 1)
193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194 #define FPE_INTOVF (__SI_FAULT | 2)
195 #define FPE_FLTDIV (__SI_FAULT | 3)
196 #define FPE_FLTOVF (__SI_FAULT | 4)
197 #define FPE_FLTUND (__SI_FAULT | 5)
198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199 #define FPE_FLTRES (__SI_FAULT | 6)
200 #define FPE_FLTINV (__SI_FAULT | 7)
201 #define FPE_FLTSUB (__SI_FAULT | 8)
202 #define NSIGFPE 8
203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204 #define SEGV_MAPERR (__SI_FAULT | 1)
205 #define SEGV_ACCERR (__SI_FAULT | 2)
206 #define SEGV_BNDERR (__SI_FAULT | 3)
207 #define SEGV_PKUERR (__SI_FAULT | 4)
208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209 #define NSIGSEGV 4
210 #define BUS_ADRALN (__SI_FAULT | 1)
211 #define BUS_ADRERR (__SI_FAULT | 2)
212 #define BUS_OBJERR (__SI_FAULT | 3)
213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214 #define BUS_MCEERR_AR (__SI_FAULT | 4)
215 #define BUS_MCEERR_AO (__SI_FAULT | 5)
216 #define NSIGBUS 5
217 #define TRAP_BRKPT (__SI_FAULT | 1)
218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219 #define TRAP_TRACE (__SI_FAULT | 2)
220 #define TRAP_BRANCH (__SI_FAULT | 3)
221 #define TRAP_HWBKPT (__SI_FAULT | 4)
222 #define NSIGTRAP 4
223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224 #define CLD_EXITED (__SI_CHLD | 1)
225 #define CLD_KILLED (__SI_CHLD | 2)
226 #define CLD_DUMPED (__SI_CHLD | 3)
227 #define CLD_TRAPPED (__SI_CHLD | 4)
228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229 #define CLD_STOPPED (__SI_CHLD | 5)
230 #define CLD_CONTINUED (__SI_CHLD | 6)
231 #define NSIGCHLD 6
232 #define POLL_IN (__SI_POLL | 1)
233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234 #define POLL_OUT (__SI_POLL | 2)
235 #define POLL_MSG (__SI_POLL | 3)
236 #define POLL_ERR (__SI_POLL | 4)
237 #define POLL_PRI (__SI_POLL | 5)
238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239 #define POLL_HUP (__SI_POLL | 6)
240 #define NSIGPOLL 6
241 #define SYS_SECCOMP (__SI_SYS | 1)
242 #define NSIGSYS 1
243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244 #define SIGEV_SIGNAL 0
245 #define SIGEV_NONE 1
246 #define SIGEV_THREAD 2
247 #define SIGEV_THREAD_ID 4
248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249 #ifndef __ARCH_SIGEV_PREAMBLE_SIZE
250 #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t))
251 #endif
252 #define SIGEV_MAX_SIZE 64
253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254 #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int))
255 typedef struct sigevent {
256   sigval_t sigev_value;
257   int sigev_signo;
258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259   int sigev_notify;
260   union {
261     int _pad[SIGEV_PAD_SIZE];
262     int _tid;
263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264     struct {
265       void(* _function) (sigval_t);
266       void * _attribute;
267     } _sigev_thread;
268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269   } _sigev_un;
270 } sigevent_t;
271 #define sigev_notify_function _sigev_un._sigev_thread._function
272 #define sigev_notify_attributes _sigev_un._sigev_thread._attribute
273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274 #define sigev_notify_thread_id _sigev_un._tid
275 #endif
276