• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 typedef union sigval {
24   int sival_int;
25   void __user * sival_ptr;
26 } sigval_t;
27 #define SI_MAX_SIZE 128
28 #ifndef __ARCH_SI_BAND_T
29 #define __ARCH_SI_BAND_T long
30 #endif
31 #ifndef __ARCH_SI_CLOCK_T
32 #define __ARCH_SI_CLOCK_T __kernel_clock_t
33 #endif
34 #ifndef __ARCH_SI_ATTRIBUTES
35 #define __ARCH_SI_ATTRIBUTES
36 #endif
37 union __sifields {
38   struct {
39     __kernel_pid_t _pid;
40     __kernel_uid32_t _uid;
41   } _kill;
42   struct {
43     __kernel_timer_t _tid;
44     int _overrun;
45     sigval_t _sigval;
46     int _sys_private;
47   } _timer;
48   struct {
49     __kernel_pid_t _pid;
50     __kernel_uid32_t _uid;
51     sigval_t _sigval;
52   } _rt;
53   struct {
54     __kernel_pid_t _pid;
55     __kernel_uid32_t _uid;
56     int _status;
57     __ARCH_SI_CLOCK_T _utime;
58     __ARCH_SI_CLOCK_T _stime;
59   } _sigchld;
60   struct {
61     void __user * _addr;
62 #ifdef __ia64__
63     int _imm;
64     unsigned int _flags;
65     unsigned long _isr;
66 #endif
67 #define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? sizeof(short) : __alignof__(void *))
68     union {
69       int _trapno;
70       short _addr_lsb;
71       struct {
72         char _dummy_bnd[__ADDR_BND_PKEY_PAD];
73         void __user * _lower;
74         void __user * _upper;
75       } _addr_bnd;
76       struct {
77         char _dummy_pkey[__ADDR_BND_PKEY_PAD];
78         __u32 _pkey;
79       } _addr_pkey;
80       struct {
81         unsigned long _data;
82         __u32 _type;
83       } _perf;
84     };
85   } _sigfault;
86   struct {
87     __ARCH_SI_BAND_T _band;
88     int _fd;
89   } _sigpoll;
90   struct {
91     void __user * _call_addr;
92     int _syscall;
93     unsigned int _arch;
94   } _sigsys;
95 };
96 #ifndef __ARCH_HAS_SWAPPED_SIGINFO
97 #define __SIGINFO struct { int si_signo; int si_errno; int si_code; union __sifields _sifields; \
98 }
99 #else
100 #define __SIGINFO struct { int si_signo; int si_code; int si_errno; union __sifields _sifields; \
101 }
102 #endif
103 typedef struct siginfo {
104   union {
105     __SIGINFO;
106     int _si_pad[SI_MAX_SIZE / sizeof(int)];
107   };
108 } __ARCH_SI_ATTRIBUTES siginfo_t;
109 #define si_pid _sifields._kill._pid
110 #define si_uid _sifields._kill._uid
111 #define si_tid _sifields._timer._tid
112 #define si_overrun _sifields._timer._overrun
113 #define si_sys_private _sifields._timer._sys_private
114 #define si_status _sifields._sigchld._status
115 #define si_utime _sifields._sigchld._utime
116 #define si_stime _sifields._sigchld._stime
117 #define si_value _sifields._rt._sigval
118 #define si_int _sifields._rt._sigval.sival_int
119 #define si_ptr _sifields._rt._sigval.sival_ptr
120 #define si_addr _sifields._sigfault._addr
121 #define si_trapno _sifields._sigfault._trapno
122 #define si_addr_lsb _sifields._sigfault._addr_lsb
123 #define si_lower _sifields._sigfault._addr_bnd._lower
124 #define si_upper _sifields._sigfault._addr_bnd._upper
125 #define si_pkey _sifields._sigfault._addr_pkey._pkey
126 #define si_perf_data _sifields._sigfault._perf._data
127 #define si_perf_type _sifields._sigfault._perf._type
128 #define si_band _sifields._sigpoll._band
129 #define si_fd _sifields._sigpoll._fd
130 #define si_call_addr _sifields._sigsys._call_addr
131 #define si_syscall _sifields._sigsys._syscall
132 #define si_arch _sifields._sigsys._arch
133 #define SI_USER 0
134 #define SI_KERNEL 0x80
135 #define SI_QUEUE - 1
136 #define SI_TIMER - 2
137 #define SI_MESGQ - 3
138 #define SI_ASYNCIO - 4
139 #define SI_SIGIO - 5
140 #define SI_TKILL - 6
141 #define SI_DETHREAD - 7
142 #define SI_ASYNCNL - 60
143 #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
144 #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
145 #define ILL_ILLOPC 1
146 #define ILL_ILLOPN 2
147 #define ILL_ILLADR 3
148 #define ILL_ILLTRP 4
149 #define ILL_PRVOPC 5
150 #define ILL_PRVREG 6
151 #define ILL_COPROC 7
152 #define ILL_BADSTK 8
153 #define ILL_BADIADDR 9
154 #define __ILL_BREAK 10
155 #define __ILL_BNDMOD 11
156 #define NSIGILL 11
157 #define FPE_INTDIV 1
158 #define FPE_INTOVF 2
159 #define FPE_FLTDIV 3
160 #define FPE_FLTOVF 4
161 #define FPE_FLTUND 5
162 #define FPE_FLTRES 6
163 #define FPE_FLTINV 7
164 #define FPE_FLTSUB 8
165 #define __FPE_DECOVF 9
166 #define __FPE_DECDIV 10
167 #define __FPE_DECERR 11
168 #define __FPE_INVASC 12
169 #define __FPE_INVDEC 13
170 #define FPE_FLTUNK 14
171 #define FPE_CONDTRAP 15
172 #define NSIGFPE 15
173 #define SEGV_MAPERR 1
174 #define SEGV_ACCERR 2
175 #define SEGV_BNDERR 3
176 #ifdef __ia64__
177 #define __SEGV_PSTKOVF 4
178 #else
179 #define SEGV_PKUERR 4
180 #endif
181 #define SEGV_ACCADI 5
182 #define SEGV_ADIDERR 6
183 #define SEGV_ADIPERR 7
184 #define SEGV_MTEAERR 8
185 #define SEGV_MTESERR 9
186 #define NSIGSEGV 9
187 #define BUS_ADRALN 1
188 #define BUS_ADRERR 2
189 #define BUS_OBJERR 3
190 #define BUS_MCEERR_AR 4
191 #define BUS_MCEERR_AO 5
192 #define NSIGBUS 5
193 #define TRAP_BRKPT 1
194 #define TRAP_TRACE 2
195 #define TRAP_BRANCH 3
196 #define TRAP_HWBKPT 4
197 #define TRAP_UNK 5
198 #define TRAP_PERF 6
199 #define NSIGTRAP 6
200 #define CLD_EXITED 1
201 #define CLD_KILLED 2
202 #define CLD_DUMPED 3
203 #define CLD_TRAPPED 4
204 #define CLD_STOPPED 5
205 #define CLD_CONTINUED 6
206 #define NSIGCHLD 6
207 #define POLL_IN 1
208 #define POLL_OUT 2
209 #define POLL_MSG 3
210 #define POLL_ERR 4
211 #define POLL_PRI 5
212 #define POLL_HUP 6
213 #define NSIGPOLL 6
214 #define SYS_SECCOMP 1
215 #define SYS_USER_DISPATCH 2
216 #define NSIGSYS 2
217 #define EMT_TAGOVF 1
218 #define NSIGEMT 1
219 #define SIGEV_SIGNAL 0
220 #define SIGEV_NONE 1
221 #define SIGEV_THREAD 2
222 #define SIGEV_THREAD_ID 4
223 #ifndef __ARCH_SIGEV_PREAMBLE_SIZE
224 #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t))
225 #endif
226 #define SIGEV_MAX_SIZE 64
227 #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int))
228 typedef struct sigevent {
229   sigval_t sigev_value;
230   int sigev_signo;
231   int sigev_notify;
232   union {
233     int _pad[SIGEV_PAD_SIZE];
234     int _tid;
235     struct {
236       void(* _function) (sigval_t);
237       void * _attribute;
238     } _sigev_thread;
239   } _sigev_un;
240 } sigevent_t;
241 #define sigev_notify_function _sigev_un._sigev_thread._function
242 #define sigev_notify_attributes _sigev_un._sigev_thread._attribute
243 #define sigev_notify_thread_id _sigev_un._tid
244 #endif
245