Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | typedef union sigval { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 24 | int sival_int; |
| 25 | void __user * sival_ptr; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 26 | } sigval_t; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define SI_MAX_SIZE 128 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 28 | #ifndef __ARCH_SI_BAND_T |
| 29 | #define __ARCH_SI_BAND_T long |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 30 | #endif |
| 31 | #ifndef __ARCH_SI_CLOCK_T |
| 32 | #define __ARCH_SI_CLOCK_T __kernel_clock_t |
| 33 | #endif |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 34 | #ifndef __ARCH_SI_ATTRIBUTES |
| 35 | #define __ARCH_SI_ATTRIBUTES |
| 36 | #endif |
Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame^] | 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; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 62 | #ifdef __ARCH_SI_TRAPNO |
Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame^] | 63 | int _trapno; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 64 | #endif |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 65 | #ifdef __ia64__ |
Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame^] | 66 | int _imm; |
| 67 | unsigned int _flags; |
| 68 | unsigned long _isr; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 69 | #endif |
| 70 | #define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? sizeof(short) : __alignof__(void *)) |
Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame^] | 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 |
| 101 | typedef struct siginfo { |
| 102 | union { |
| 103 | __SIGINFO; |
| 104 | int _si_pad[SI_MAX_SIZE / sizeof(int)]; |
| 105 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 106 | } __ARCH_SI_ATTRIBUTES siginfo_t; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 107 | #define si_pid _sifields._kill._pid |
| 108 | #define si_uid _sifields._kill._uid |
| 109 | #define si_tid _sifields._timer._tid |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 118 | #define si_addr _sifields._sigfault._addr |
| 119 | #ifdef __ARCH_SI_TRAPNO |
| 120 | #define si_trapno _sifields._sigfault._trapno |
| 121 | #endif |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 122 | #define si_addr_lsb _sifields._sigfault._addr_lsb |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 123 | #define si_lower _sifields._sigfault._addr_bnd._lower |
| 124 | #define si_upper _sifields._sigfault._addr_bnd._upper |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 125 | #define si_pkey _sifields._sigfault._addr_pkey._pkey |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 126 | #define si_band _sifields._sigpoll._band |
| 127 | #define si_fd _sifields._sigpoll._fd |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 128 | #define si_call_addr _sifields._sigsys._call_addr |
| 129 | #define si_syscall _sifields._sigsys._syscall |
| 130 | #define si_arch _sifields._sigsys._arch |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 131 | #define SI_USER 0 |
| 132 | #define SI_KERNEL 0x80 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 133 | #define SI_QUEUE - 1 |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 134 | #define SI_TIMER - 2 |
| 135 | #define SI_MESGQ - 3 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 136 | #define SI_ASYNCIO - 4 |
| 137 | #define SI_SIGIO - 5 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 138 | #define SI_TKILL - 6 |
| 139 | #define SI_DETHREAD - 7 |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 140 | #define SI_ASYNCNL - 60 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 141 | #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) |
| 142 | #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 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 |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 151 | #define ILL_BADIADDR 9 |
| 152 | #define __ILL_BREAK 10 |
| 153 | #define __ILL_BNDMOD 11 |
| 154 | #define NSIGILL 11 |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 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 |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 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 |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 171 | #define SEGV_MAPERR 1 |
| 172 | #define SEGV_ACCERR 2 |
| 173 | #define SEGV_BNDERR 3 |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 174 | #ifdef __ia64__ |
| 175 | #define __SEGV_PSTKOVF 4 |
| 176 | #else |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 177 | #define SEGV_PKUERR 4 |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 178 | #endif |
| 179 | #define SEGV_ACCADI 5 |
| 180 | #define SEGV_ADIDERR 6 |
| 181 | #define SEGV_ADIPERR 7 |
| 182 | #define NSIGSEGV 7 |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 183 | #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 Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 188 | #define NSIGBUS 5 |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 189 | #define TRAP_BRKPT 1 |
| 190 | #define TRAP_TRACE 2 |
| 191 | #define TRAP_BRANCH 3 |
| 192 | #define TRAP_HWBKPT 4 |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 193 | #define TRAP_UNK 5 |
| 194 | #define NSIGTRAP 5 |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 195 | #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 Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 201 | #define NSIGCHLD 6 |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 202 | #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 Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 208 | #define NSIGPOLL 6 |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 209 | #define SYS_SECCOMP 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 210 | #define NSIGSYS 1 |
Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame^] | 211 | #define EMT_TAGOVF 1 |
| 212 | #define NSIGEMT 1 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 213 | #define SIGEV_SIGNAL 0 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 214 | #define SIGEV_NONE 1 |
| 215 | #define SIGEV_THREAD 2 |
| 216 | #define SIGEV_THREAD_ID 4 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 217 | #ifndef __ARCH_SIGEV_PREAMBLE_SIZE |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 218 | #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t)) |
| 219 | #endif |
| 220 | #define SIGEV_MAX_SIZE 64 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 221 | #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int)) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 222 | typedef struct sigevent { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 223 | sigval_t sigev_value; |
| 224 | int sigev_signo; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 225 | int sigev_notify; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 226 | union { |
| 227 | int _pad[SIGEV_PAD_SIZE]; |
| 228 | int _tid; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 229 | struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 230 | void(* _function) (sigval_t); |
| 231 | void * _attribute; |
| 232 | } _sigev_thread; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 233 | } _sigev_un; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 234 | } sigevent_t; |
| 235 | #define sigev_notify_function _sigev_un._sigev_thread._function |
| 236 | #define sigev_notify_attributes _sigev_un._sigev_thread._attribute |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 237 | #define sigev_notify_thread_id _sigev_un._tid |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 238 | #endif |