blob: 166193b84bed86b2dcd39dd45a9c6f12e909a185 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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>
Ben Cheng655a7c02013-10-16 16:09:24 -070023typedef union sigval {
Tao Baod7db5942015-01-28 10:07:51 -080024 int sival_int;
25 void __user * sival_ptr;
Ben Cheng655a7c02013-10-16 16:09:24 -070026} sigval_t;
Ben Cheng655a7c02013-10-16 16:09:24 -070027#ifndef __ARCH_SI_PREAMBLE_SIZE
28#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
29#endif
30#define SI_MAX_SIZE 128
Ben Cheng655a7c02013-10-16 16:09:24 -070031#ifndef SI_PAD_SIZE
32#define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
33#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070034#ifndef __ARCH_SI_BAND_T
35#define __ARCH_SI_BAND_T long
Ben Cheng655a7c02013-10-16 16:09:24 -070036#endif
37#ifndef __ARCH_SI_CLOCK_T
38#define __ARCH_SI_CLOCK_T __kernel_clock_t
39#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070040#ifndef __ARCH_SI_ATTRIBUTES
41#define __ARCH_SI_ATTRIBUTES
42#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070043typedef struct siginfo {
Tao Baod7db5942015-01-28 10:07:51 -080044 int si_signo;
Christopher Ferris76a1d452018-06-27 14:12:29 -070045#ifndef __ARCH_HAS_SWAPPED_SIGINFO
Tao Baod7db5942015-01-28 10:07:51 -080046 int si_errno;
47 int si_code;
Christopher Ferris76a1d452018-06-27 14:12:29 -070048#else
49 int si_code;
50 int si_errno;
51#endif
Tao Baod7db5942015-01-28 10:07:51 -080052 union {
53 int _pad[SI_PAD_SIZE];
54 struct {
55 __kernel_pid_t _pid;
Christopher Ferris76a1d452018-06-27 14:12:29 -070056 __kernel_uid32_t _uid;
Tao Baod7db5942015-01-28 10:07:51 -080057 } _kill;
58 struct {
59 __kernel_timer_t _tid;
Tao Baod7db5942015-01-28 10:07:51 -080060 int _overrun;
Tao Baod7db5942015-01-28 10:07:51 -080061 sigval_t _sigval;
62 int _sys_private;
Tao Baod7db5942015-01-28 10:07:51 -080063 } _timer;
64 struct {
65 __kernel_pid_t _pid;
Christopher Ferris76a1d452018-06-27 14:12:29 -070066 __kernel_uid32_t _uid;
Tao Baod7db5942015-01-28 10:07:51 -080067 sigval_t _sigval;
68 } _rt;
69 struct {
70 __kernel_pid_t _pid;
Christopher Ferris76a1d452018-06-27 14:12:29 -070071 __kernel_uid32_t _uid;
Tao Baod7db5942015-01-28 10:07:51 -080072 int _status;
73 __ARCH_SI_CLOCK_T _utime;
74 __ARCH_SI_CLOCK_T _stime;
Tao Baod7db5942015-01-28 10:07:51 -080075 } _sigchld;
76 struct {
77 void __user * _addr;
Ben Cheng655a7c02013-10-16 16:09:24 -070078#ifdef __ARCH_SI_TRAPNO
Tao Baod7db5942015-01-28 10:07:51 -080079 int _trapno;
Ben Cheng655a7c02013-10-16 16:09:24 -070080#endif
Christopher Ferris76a1d452018-06-27 14:12:29 -070081#ifdef __ia64__
82 int _imm;
83 unsigned int _flags;
84 unsigned long _isr;
85#endif
86#define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? sizeof(short) : __alignof__(void *))
Christopher Ferris106b3a82016-08-24 12:15:38 -070087 union {
Christopher Ferris76a1d452018-06-27 14:12:29 -070088 short _addr_lsb;
Christopher Ferris106b3a82016-08-24 12:15:38 -070089 struct {
Christopher Ferris76a1d452018-06-27 14:12:29 -070090 char _dummy_bnd[__ADDR_BND_PKEY_PAD];
Christopher Ferris106b3a82016-08-24 12:15:38 -070091 void __user * _lower;
92 void __user * _upper;
93 } _addr_bnd;
Christopher Ferris76a1d452018-06-27 14:12:29 -070094 struct {
95 char _dummy_pkey[__ADDR_BND_PKEY_PAD];
96 __u32 _pkey;
97 } _addr_pkey;
Christopher Ferris106b3a82016-08-24 12:15:38 -070098 };
Tao Baod7db5942015-01-28 10:07:51 -080099 } _sigfault;
Tao Baod7db5942015-01-28 10:07:51 -0800100 struct {
101 __ARCH_SI_BAND_T _band;
102 int _fd;
103 } _sigpoll;
Tao Baod7db5942015-01-28 10:07:51 -0800104 struct {
105 void __user * _call_addr;
106 int _syscall;
107 unsigned int _arch;
Tao Baod7db5942015-01-28 10:07:51 -0800108 } _sigsys;
109 } _sifields;
Ben Cheng655a7c02013-10-16 16:09:24 -0700110} __ARCH_SI_ATTRIBUTES siginfo_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700111#define si_pid _sifields._kill._pid
112#define si_uid _sifields._kill._uid
113#define si_tid _sifields._timer._tid
Ben Cheng655a7c02013-10-16 16:09:24 -0700114#define si_overrun _sifields._timer._overrun
115#define si_sys_private _sifields._timer._sys_private
116#define si_status _sifields._sigchld._status
117#define si_utime _sifields._sigchld._utime
Ben Cheng655a7c02013-10-16 16:09:24 -0700118#define si_stime _sifields._sigchld._stime
119#define si_value _sifields._rt._sigval
120#define si_int _sifields._rt._sigval.sival_int
121#define si_ptr _sifields._rt._sigval.sival_ptr
Ben Cheng655a7c02013-10-16 16:09:24 -0700122#define si_addr _sifields._sigfault._addr
123#ifdef __ARCH_SI_TRAPNO
124#define si_trapno _sifields._sigfault._trapno
125#endif
Ben Cheng655a7c02013-10-16 16:09:24 -0700126#define si_addr_lsb _sifields._sigfault._addr_lsb
Christopher Ferris05d08e92016-02-04 13:16:38 -0800127#define si_lower _sifields._sigfault._addr_bnd._lower
128#define si_upper _sifields._sigfault._addr_bnd._upper
Christopher Ferris76a1d452018-06-27 14:12:29 -0700129#define si_pkey _sifields._sigfault._addr_pkey._pkey
Ben Cheng655a7c02013-10-16 16:09:24 -0700130#define si_band _sifields._sigpoll._band
131#define si_fd _sifields._sigpoll._fd
Ben Cheng655a7c02013-10-16 16:09:24 -0700132#define si_call_addr _sifields._sigsys._call_addr
133#define si_syscall _sifields._sigsys._syscall
134#define si_arch _sifields._sigsys._arch
Ben Cheng655a7c02013-10-16 16:09:24 -0700135#define SI_USER 0
136#define SI_KERNEL 0x80
Tao Baod7db5942015-01-28 10:07:51 -0800137#define SI_QUEUE - 1
Christopher Ferris1308ad32017-11-14 17:32:13 -0800138#define SI_TIMER - 2
139#define SI_MESGQ - 3
Tao Baod7db5942015-01-28 10:07:51 -0800140#define SI_ASYNCIO - 4
141#define SI_SIGIO - 5
Tao Baod7db5942015-01-28 10:07:51 -0800142#define SI_TKILL - 6
143#define SI_DETHREAD - 7
Christopher Ferris76a1d452018-06-27 14:12:29 -0700144#define SI_ASYNCNL - 60
Ben Cheng655a7c02013-10-16 16:09:24 -0700145#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
146#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
Christopher Ferris1308ad32017-11-14 17:32:13 -0800147#define ILL_ILLOPC 1
148#define ILL_ILLOPN 2
149#define ILL_ILLADR 3
150#define ILL_ILLTRP 4
151#define ILL_PRVOPC 5
152#define ILL_PRVREG 6
153#define ILL_COPROC 7
154#define ILL_BADSTK 8
Christopher Ferris76a1d452018-06-27 14:12:29 -0700155#define ILL_BADIADDR 9
156#define __ILL_BREAK 10
157#define __ILL_BNDMOD 11
158#define NSIGILL 11
Christopher Ferris1308ad32017-11-14 17:32:13 -0800159#define FPE_INTDIV 1
160#define FPE_INTOVF 2
161#define FPE_FLTDIV 3
162#define FPE_FLTOVF 4
163#define FPE_FLTUND 5
164#define FPE_FLTRES 6
165#define FPE_FLTINV 7
166#define FPE_FLTSUB 8
Christopher Ferris76a1d452018-06-27 14:12:29 -0700167#define __FPE_DECOVF 9
168#define __FPE_DECDIV 10
169#define __FPE_DECERR 11
170#define __FPE_INVASC 12
171#define __FPE_INVDEC 13
172#define FPE_FLTUNK 14
173#define FPE_CONDTRAP 15
174#define NSIGFPE 15
Christopher Ferris1308ad32017-11-14 17:32:13 -0800175#define SEGV_MAPERR 1
176#define SEGV_ACCERR 2
177#define SEGV_BNDERR 3
Christopher Ferris76a1d452018-06-27 14:12:29 -0700178#ifdef __ia64__
179#define __SEGV_PSTKOVF 4
180#else
Christopher Ferris1308ad32017-11-14 17:32:13 -0800181#define SEGV_PKUERR 4
Christopher Ferris76a1d452018-06-27 14:12:29 -0700182#endif
183#define SEGV_ACCADI 5
184#define SEGV_ADIDERR 6
185#define SEGV_ADIPERR 7
186#define NSIGSEGV 7
Christopher Ferris1308ad32017-11-14 17:32:13 -0800187#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
Ben Cheng655a7c02013-10-16 16:09:24 -0700192#define NSIGBUS 5
Christopher Ferris1308ad32017-11-14 17:32:13 -0800193#define TRAP_BRKPT 1
194#define TRAP_TRACE 2
195#define TRAP_BRANCH 3
196#define TRAP_HWBKPT 4
Christopher Ferris9ce28842018-10-25 12:11:39 -0700197#define TRAP_UNK 5
198#define NSIGTRAP 5
Christopher Ferris1308ad32017-11-14 17:32:13 -0800199#define CLD_EXITED 1
200#define CLD_KILLED 2
201#define CLD_DUMPED 3
202#define CLD_TRAPPED 4
203#define CLD_STOPPED 5
204#define CLD_CONTINUED 6
Ben Cheng655a7c02013-10-16 16:09:24 -0700205#define NSIGCHLD 6
Christopher Ferris1308ad32017-11-14 17:32:13 -0800206#define POLL_IN 1
207#define POLL_OUT 2
208#define POLL_MSG 3
209#define POLL_ERR 4
210#define POLL_PRI 5
211#define POLL_HUP 6
Ben Cheng655a7c02013-10-16 16:09:24 -0700212#define NSIGPOLL 6
Christopher Ferris1308ad32017-11-14 17:32:13 -0800213#define SYS_SECCOMP 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700214#define NSIGSYS 1
Christopher Ferris106b3a82016-08-24 12:15:38 -0700215#define SIGEV_SIGNAL 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700216#define SIGEV_NONE 1
217#define SIGEV_THREAD 2
218#define SIGEV_THREAD_ID 4
Christopher Ferris106b3a82016-08-24 12:15:38 -0700219#ifndef __ARCH_SIGEV_PREAMBLE_SIZE
Ben Cheng655a7c02013-10-16 16:09:24 -0700220#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t))
221#endif
222#define SIGEV_MAX_SIZE 64
Christopher Ferris106b3a82016-08-24 12:15:38 -0700223#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int))
Ben Cheng655a7c02013-10-16 16:09:24 -0700224typedef struct sigevent {
Tao Baod7db5942015-01-28 10:07:51 -0800225 sigval_t sigev_value;
226 int sigev_signo;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700227 int sigev_notify;
Tao Baod7db5942015-01-28 10:07:51 -0800228 union {
229 int _pad[SIGEV_PAD_SIZE];
230 int _tid;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700231 struct {
Tao Baod7db5942015-01-28 10:07:51 -0800232 void(* _function) (sigval_t);
233 void * _attribute;
234 } _sigev_thread;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700235 } _sigev_un;
Ben Cheng655a7c02013-10-16 16:09:24 -0700236} sigevent_t;
237#define sigev_notify_function _sigev_un._sigev_thread._function
238#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
Christopher Ferris106b3a82016-08-24 12:15:38 -0700239#define sigev_notify_thread_id _sigev_un._tid
Ben Cheng655a7c02013-10-16 16:09:24 -0700240#endif