blob: 829ffad4fa9c2e862fd1613273f7b7d41573b8c7 [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#define SI_MAX_SIZE 128
Ben Cheng655a7c02013-10-16 16:09:24 -070028#ifndef __ARCH_SI_BAND_T
29#define __ARCH_SI_BAND_T long
Ben Cheng655a7c02013-10-16 16:09:24 -070030#endif
31#ifndef __ARCH_SI_CLOCK_T
32#define __ARCH_SI_CLOCK_T __kernel_clock_t
33#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070034#ifndef __ARCH_SI_ATTRIBUTES
35#define __ARCH_SI_ATTRIBUTES
36#endif
Christopher Ferris86a48372019-01-10 14:14:59 -080037union __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;
Ben Cheng655a7c02013-10-16 16:09:24 -070062#ifdef __ARCH_SI_TRAPNO
Christopher Ferris86a48372019-01-10 14:14:59 -080063 int _trapno;
Ben Cheng655a7c02013-10-16 16:09:24 -070064#endif
Christopher Ferris76a1d452018-06-27 14:12:29 -070065#ifdef __ia64__
Christopher Ferris86a48372019-01-10 14:14:59 -080066 int _imm;
67 unsigned int _flags;
68 unsigned long _isr;
Christopher Ferris76a1d452018-06-27 14:12:29 -070069#endif
70#define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? sizeof(short) : __alignof__(void *))
Christopher Ferris86a48372019-01-10 14:14:59 -080071 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 };
Ben Cheng655a7c02013-10-16 16:09:24 -0700106} __ARCH_SI_ATTRIBUTES siginfo_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700107#define si_pid _sifields._kill._pid
108#define si_uid _sifields._kill._uid
109#define si_tid _sifields._timer._tid
Ben Cheng655a7c02013-10-16 16:09:24 -0700110#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
Ben Cheng655a7c02013-10-16 16:09:24 -0700114#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
Ben Cheng655a7c02013-10-16 16:09:24 -0700118#define si_addr _sifields._sigfault._addr
119#ifdef __ARCH_SI_TRAPNO
120#define si_trapno _sifields._sigfault._trapno
121#endif
Ben Cheng655a7c02013-10-16 16:09:24 -0700122#define si_addr_lsb _sifields._sigfault._addr_lsb
Christopher Ferris05d08e92016-02-04 13:16:38 -0800123#define si_lower _sifields._sigfault._addr_bnd._lower
124#define si_upper _sifields._sigfault._addr_bnd._upper
Christopher Ferris76a1d452018-06-27 14:12:29 -0700125#define si_pkey _sifields._sigfault._addr_pkey._pkey
Ben Cheng655a7c02013-10-16 16:09:24 -0700126#define si_band _sifields._sigpoll._band
127#define si_fd _sifields._sigpoll._fd
Ben Cheng655a7c02013-10-16 16:09:24 -0700128#define si_call_addr _sifields._sigsys._call_addr
129#define si_syscall _sifields._sigsys._syscall
130#define si_arch _sifields._sigsys._arch
Ben Cheng655a7c02013-10-16 16:09:24 -0700131#define SI_USER 0
132#define SI_KERNEL 0x80
Tao Baod7db5942015-01-28 10:07:51 -0800133#define SI_QUEUE - 1
Christopher Ferris1308ad32017-11-14 17:32:13 -0800134#define SI_TIMER - 2
135#define SI_MESGQ - 3
Tao Baod7db5942015-01-28 10:07:51 -0800136#define SI_ASYNCIO - 4
137#define SI_SIGIO - 5
Tao Baod7db5942015-01-28 10:07:51 -0800138#define SI_TKILL - 6
139#define SI_DETHREAD - 7
Christopher Ferris76a1d452018-06-27 14:12:29 -0700140#define SI_ASYNCNL - 60
Ben Cheng655a7c02013-10-16 16:09:24 -0700141#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
142#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
Christopher Ferris1308ad32017-11-14 17:32:13 -0800143#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
Christopher Ferris76a1d452018-06-27 14:12:29 -0700151#define ILL_BADIADDR 9
152#define __ILL_BREAK 10
153#define __ILL_BNDMOD 11
154#define NSIGILL 11
Christopher Ferris1308ad32017-11-14 17:32:13 -0800155#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
Christopher Ferris76a1d452018-06-27 14:12:29 -0700163#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
Christopher Ferris1308ad32017-11-14 17:32:13 -0800171#define SEGV_MAPERR 1
172#define SEGV_ACCERR 2
173#define SEGV_BNDERR 3
Christopher Ferris76a1d452018-06-27 14:12:29 -0700174#ifdef __ia64__
175#define __SEGV_PSTKOVF 4
176#else
Christopher Ferris1308ad32017-11-14 17:32:13 -0800177#define SEGV_PKUERR 4
Christopher Ferris76a1d452018-06-27 14:12:29 -0700178#endif
179#define SEGV_ACCADI 5
180#define SEGV_ADIDERR 6
181#define SEGV_ADIPERR 7
182#define NSIGSEGV 7
Christopher Ferris1308ad32017-11-14 17:32:13 -0800183#define BUS_ADRALN 1
184#define BUS_ADRERR 2
185#define BUS_OBJERR 3
186#define BUS_MCEERR_AR 4
187#define BUS_MCEERR_AO 5
Ben Cheng655a7c02013-10-16 16:09:24 -0700188#define NSIGBUS 5
Christopher Ferris1308ad32017-11-14 17:32:13 -0800189#define TRAP_BRKPT 1
190#define TRAP_TRACE 2
191#define TRAP_BRANCH 3
192#define TRAP_HWBKPT 4
Christopher Ferris9ce28842018-10-25 12:11:39 -0700193#define TRAP_UNK 5
194#define NSIGTRAP 5
Christopher Ferris1308ad32017-11-14 17:32:13 -0800195#define CLD_EXITED 1
196#define CLD_KILLED 2
197#define CLD_DUMPED 3
198#define CLD_TRAPPED 4
199#define CLD_STOPPED 5
200#define CLD_CONTINUED 6
Ben Cheng655a7c02013-10-16 16:09:24 -0700201#define NSIGCHLD 6
Christopher Ferris1308ad32017-11-14 17:32:13 -0800202#define POLL_IN 1
203#define POLL_OUT 2
204#define POLL_MSG 3
205#define POLL_ERR 4
206#define POLL_PRI 5
207#define POLL_HUP 6
Ben Cheng655a7c02013-10-16 16:09:24 -0700208#define NSIGPOLL 6
Christopher Ferris1308ad32017-11-14 17:32:13 -0800209#define SYS_SECCOMP 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700210#define NSIGSYS 1
Christopher Ferris86a48372019-01-10 14:14:59 -0800211#define EMT_TAGOVF 1
212#define NSIGEMT 1
Christopher Ferris106b3a82016-08-24 12:15:38 -0700213#define SIGEV_SIGNAL 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700214#define SIGEV_NONE 1
215#define SIGEV_THREAD 2
216#define SIGEV_THREAD_ID 4
Christopher Ferris106b3a82016-08-24 12:15:38 -0700217#ifndef __ARCH_SIGEV_PREAMBLE_SIZE
Ben Cheng655a7c02013-10-16 16:09:24 -0700218#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t))
219#endif
220#define SIGEV_MAX_SIZE 64
Christopher Ferris106b3a82016-08-24 12:15:38 -0700221#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int))
Ben Cheng655a7c02013-10-16 16:09:24 -0700222typedef struct sigevent {
Tao Baod7db5942015-01-28 10:07:51 -0800223 sigval_t sigev_value;
224 int sigev_signo;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700225 int sigev_notify;
Tao Baod7db5942015-01-28 10:07:51 -0800226 union {
227 int _pad[SIGEV_PAD_SIZE];
228 int _tid;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700229 struct {
Tao Baod7db5942015-01-28 10:07:51 -0800230 void(* _function) (sigval_t);
231 void * _attribute;
232 } _sigev_thread;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700233 } _sigev_un;
Ben Cheng655a7c02013-10-16 16:09:24 -0700234} sigevent_t;
235#define sigev_notify_function _sigev_un._sigev_thread._function
236#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
Christopher Ferris106b3a82016-08-24 12:15:38 -0700237#define sigev_notify_thread_id _sigev_un._tid
Ben Cheng655a7c02013-10-16 16:09:24 -0700238#endif