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