blob: a6eef5aa17ec81ddb293a043a59a5216c2ff2835 [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;
Elliott Hughes0f0c18f2023-03-29 15:53:31 -070025 void * 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 {
Elliott Hughes0f0c18f2023-03-29 15:53:31 -070061 void * _addr;
Christopher Ferris76a1d452018-06-27 14:12:29 -070062#ifdef __ia64__
Christopher Ferris86a48372019-01-10 14:14:59 -080063 int _imm;
64 unsigned int _flags;
65 unsigned long _isr;
Christopher Ferris76a1d452018-06-27 14:12:29 -070066#endif
67#define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? sizeof(short) : __alignof__(void *))
Christopher Ferris86a48372019-01-10 14:14:59 -080068 union {
Christopher Ferrisfcc3b4f2021-07-01 01:30:21 +000069 int _trapno;
Christopher Ferris86a48372019-01-10 14:14:59 -080070 short _addr_lsb;
71 struct {
72 char _dummy_bnd[__ADDR_BND_PKEY_PAD];
Elliott Hughes0f0c18f2023-03-29 15:53:31 -070073 void * _lower;
74 void * _upper;
Christopher Ferris86a48372019-01-10 14:14:59 -080075 } _addr_bnd;
76 struct {
77 char _dummy_pkey[__ADDR_BND_PKEY_PAD];
78 __u32 _pkey;
79 } _addr_pkey;
Christopher Ferrisfcc3b4f2021-07-01 01:30:21 +000080 struct {
81 unsigned long _data;
82 __u32 _type;
Christopher Ferris80ae69d2022-08-02 16:32:21 -070083 __u32 _flags;
Christopher Ferrisfcc3b4f2021-07-01 01:30:21 +000084 } _perf;
Christopher Ferris86a48372019-01-10 14:14:59 -080085 };
86 } _sigfault;
87 struct {
88 __ARCH_SI_BAND_T _band;
89 int _fd;
90 } _sigpoll;
91 struct {
Elliott Hughes0f0c18f2023-03-29 15:53:31 -070092 void * _call_addr;
Christopher Ferris86a48372019-01-10 14:14:59 -080093 int _syscall;
94 unsigned int _arch;
95 } _sigsys;
96};
97#ifndef __ARCH_HAS_SWAPPED_SIGINFO
98#define __SIGINFO struct { int si_signo; int si_errno; int si_code; union __sifields _sifields; \
99}
100#else
101#define __SIGINFO struct { int si_signo; int si_code; int si_errno; union __sifields _sifields; \
102}
103#endif
104typedef struct siginfo {
105 union {
106 __SIGINFO;
107 int _si_pad[SI_MAX_SIZE / sizeof(int)];
108 };
Ben Cheng655a7c02013-10-16 16:09:24 -0700109} __ARCH_SI_ATTRIBUTES siginfo_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700110#define si_pid _sifields._kill._pid
111#define si_uid _sifields._kill._uid
112#define si_tid _sifields._timer._tid
Ben Cheng655a7c02013-10-16 16:09:24 -0700113#define si_overrun _sifields._timer._overrun
114#define si_sys_private _sifields._timer._sys_private
115#define si_status _sifields._sigchld._status
116#define si_utime _sifields._sigchld._utime
Ben Cheng655a7c02013-10-16 16:09:24 -0700117#define si_stime _sifields._sigchld._stime
118#define si_value _sifields._rt._sigval
119#define si_int _sifields._rt._sigval.sival_int
120#define si_ptr _sifields._rt._sigval.sival_ptr
Ben Cheng655a7c02013-10-16 16:09:24 -0700121#define si_addr _sifields._sigfault._addr
Ben Cheng655a7c02013-10-16 16:09:24 -0700122#define si_trapno _sifields._sigfault._trapno
Ben Cheng655a7c02013-10-16 16:09:24 -0700123#define si_addr_lsb _sifields._sigfault._addr_lsb
Christopher Ferris05d08e92016-02-04 13:16:38 -0800124#define si_lower _sifields._sigfault._addr_bnd._lower
125#define si_upper _sifields._sigfault._addr_bnd._upper
Christopher Ferris76a1d452018-06-27 14:12:29 -0700126#define si_pkey _sifields._sigfault._addr_pkey._pkey
Christopher Ferrisfcc3b4f2021-07-01 01:30:21 +0000127#define si_perf_data _sifields._sigfault._perf._data
128#define si_perf_type _sifields._sigfault._perf._type
Christopher Ferris80ae69d2022-08-02 16:32:21 -0700129#define si_perf_flags _sifields._sigfault._perf._flags
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
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800186#define SEGV_MTEAERR 8
187#define SEGV_MTESERR 9
Christopher Ferris67d1e5e2023-10-31 13:36:37 -0700188#define SEGV_CPERR 10
189#define NSIGSEGV 10
Christopher Ferris1308ad32017-11-14 17:32:13 -0800190#define BUS_ADRALN 1
191#define BUS_ADRERR 2
192#define BUS_OBJERR 3
193#define BUS_MCEERR_AR 4
194#define BUS_MCEERR_AO 5
Ben Cheng655a7c02013-10-16 16:09:24 -0700195#define NSIGBUS 5
Christopher Ferris1308ad32017-11-14 17:32:13 -0800196#define TRAP_BRKPT 1
197#define TRAP_TRACE 2
198#define TRAP_BRANCH 3
199#define TRAP_HWBKPT 4
Christopher Ferris9ce28842018-10-25 12:11:39 -0700200#define TRAP_UNK 5
Christopher Ferrisfcc3b4f2021-07-01 01:30:21 +0000201#define TRAP_PERF 6
202#define NSIGTRAP 6
Christopher Ferris80ae69d2022-08-02 16:32:21 -0700203#define TRAP_PERF_FLAG_ASYNC (1u << 0)
Christopher Ferris1308ad32017-11-14 17:32:13 -0800204#define CLD_EXITED 1
205#define CLD_KILLED 2
206#define CLD_DUMPED 3
207#define CLD_TRAPPED 4
208#define CLD_STOPPED 5
209#define CLD_CONTINUED 6
Ben Cheng655a7c02013-10-16 16:09:24 -0700210#define NSIGCHLD 6
Christopher Ferris1308ad32017-11-14 17:32:13 -0800211#define POLL_IN 1
212#define POLL_OUT 2
213#define POLL_MSG 3
214#define POLL_ERR 4
215#define POLL_PRI 5
216#define POLL_HUP 6
Ben Cheng655a7c02013-10-16 16:09:24 -0700217#define NSIGPOLL 6
Christopher Ferris1308ad32017-11-14 17:32:13 -0800218#define SYS_SECCOMP 1
Christopher Ferris05667cd2021-02-16 16:01:34 -0800219#define SYS_USER_DISPATCH 2
220#define NSIGSYS 2
Christopher Ferris86a48372019-01-10 14:14:59 -0800221#define EMT_TAGOVF 1
222#define NSIGEMT 1
Christopher Ferris106b3a82016-08-24 12:15:38 -0700223#define SIGEV_SIGNAL 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700224#define SIGEV_NONE 1
225#define SIGEV_THREAD 2
226#define SIGEV_THREAD_ID 4
Christopher Ferris106b3a82016-08-24 12:15:38 -0700227#ifndef __ARCH_SIGEV_PREAMBLE_SIZE
Ben Cheng655a7c02013-10-16 16:09:24 -0700228#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t))
229#endif
230#define SIGEV_MAX_SIZE 64
Christopher Ferris106b3a82016-08-24 12:15:38 -0700231#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int))
Ben Cheng655a7c02013-10-16 16:09:24 -0700232typedef struct sigevent {
Tao Baod7db5942015-01-28 10:07:51 -0800233 sigval_t sigev_value;
234 int sigev_signo;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700235 int sigev_notify;
Tao Baod7db5942015-01-28 10:07:51 -0800236 union {
237 int _pad[SIGEV_PAD_SIZE];
238 int _tid;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700239 struct {
Tao Baod7db5942015-01-28 10:07:51 -0800240 void(* _function) (sigval_t);
241 void * _attribute;
242 } _sigev_thread;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700243 } _sigev_un;
Ben Cheng655a7c02013-10-16 16:09:24 -0700244} sigevent_t;
245#define sigev_notify_function _sigev_un._sigev_thread._function
246#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
Christopher Ferris106b3a82016-08-24 12:15:38 -0700247#define sigev_notify_thread_id _sigev_un._tid
Ben Cheng655a7c02013-10-16 16:09:24 -0700248#endif