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> 23 typedef union sigval { 24 int sival_int; 25 void * 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 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 * _addr; 62 #ifdef __ia64__ 63 int _imm; 64 unsigned int _flags; 65 unsigned long _isr; 66 #endif 67 #define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? sizeof(short) : __alignof__(void *)) 68 union { 69 int _trapno; 70 short _addr_lsb; 71 struct { 72 char _dummy_bnd[__ADDR_BND_PKEY_PAD]; 73 void * _lower; 74 void * _upper; 75 } _addr_bnd; 76 struct { 77 char _dummy_pkey[__ADDR_BND_PKEY_PAD]; 78 __u32 _pkey; 79 } _addr_pkey; 80 struct { 81 unsigned long _data; 82 __u32 _type; 83 __u32 _flags; 84 } _perf; 85 }; 86 } _sigfault; 87 struct { 88 __ARCH_SI_BAND_T _band; 89 int _fd; 90 } _sigpoll; 91 struct { 92 void * _call_addr; 93 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 104 typedef struct siginfo { 105 union { 106 __SIGINFO; 107 int _si_pad[SI_MAX_SIZE / sizeof(int)]; 108 }; 109 } __ARCH_SI_ATTRIBUTES siginfo_t; 110 #define si_pid _sifields._kill._pid 111 #define si_uid _sifields._kill._uid 112 #define si_tid _sifields._timer._tid 113 #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 117 #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 121 #define si_addr _sifields._sigfault._addr 122 #define si_trapno _sifields._sigfault._trapno 123 #define si_addr_lsb _sifields._sigfault._addr_lsb 124 #define si_lower _sifields._sigfault._addr_bnd._lower 125 #define si_upper _sifields._sigfault._addr_bnd._upper 126 #define si_pkey _sifields._sigfault._addr_pkey._pkey 127 #define si_perf_data _sifields._sigfault._perf._data 128 #define si_perf_type _sifields._sigfault._perf._type 129 #define si_perf_flags _sifields._sigfault._perf._flags 130 #define si_band _sifields._sigpoll._band 131 #define si_fd _sifields._sigpoll._fd 132 #define si_call_addr _sifields._sigsys._call_addr 133 #define si_syscall _sifields._sigsys._syscall 134 #define si_arch _sifields._sigsys._arch 135 #define SI_USER 0 136 #define SI_KERNEL 0x80 137 #define SI_QUEUE - 1 138 #define SI_TIMER - 2 139 #define SI_MESGQ - 3 140 #define SI_ASYNCIO - 4 141 #define SI_SIGIO - 5 142 #define SI_TKILL - 6 143 #define SI_DETHREAD - 7 144 #define SI_ASYNCNL - 60 145 #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) 146 #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) 147 #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 155 #define ILL_BADIADDR 9 156 #define __ILL_BREAK 10 157 #define __ILL_BNDMOD 11 158 #define NSIGILL 11 159 #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 167 #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 175 #define SEGV_MAPERR 1 176 #define SEGV_ACCERR 2 177 #define SEGV_BNDERR 3 178 #ifdef __ia64__ 179 #define __SEGV_PSTKOVF 4 180 #else 181 #define SEGV_PKUERR 4 182 #endif 183 #define SEGV_ACCADI 5 184 #define SEGV_ADIDERR 6 185 #define SEGV_ADIPERR 7 186 #define SEGV_MTEAERR 8 187 #define SEGV_MTESERR 9 188 #define NSIGSEGV 9 189 #define BUS_ADRALN 1 190 #define BUS_ADRERR 2 191 #define BUS_OBJERR 3 192 #define BUS_MCEERR_AR 4 193 #define BUS_MCEERR_AO 5 194 #define NSIGBUS 5 195 #define TRAP_BRKPT 1 196 #define TRAP_TRACE 2 197 #define TRAP_BRANCH 3 198 #define TRAP_HWBKPT 4 199 #define TRAP_UNK 5 200 #define TRAP_PERF 6 201 #define NSIGTRAP 6 202 #define TRAP_PERF_FLAG_ASYNC (1u << 0) 203 #define CLD_EXITED 1 204 #define CLD_KILLED 2 205 #define CLD_DUMPED 3 206 #define CLD_TRAPPED 4 207 #define CLD_STOPPED 5 208 #define CLD_CONTINUED 6 209 #define NSIGCHLD 6 210 #define POLL_IN 1 211 #define POLL_OUT 2 212 #define POLL_MSG 3 213 #define POLL_ERR 4 214 #define POLL_PRI 5 215 #define POLL_HUP 6 216 #define NSIGPOLL 6 217 #define SYS_SECCOMP 1 218 #define SYS_USER_DISPATCH 2 219 #define NSIGSYS 2 220 #define EMT_TAGOVF 1 221 #define NSIGEMT 1 222 #define SIGEV_SIGNAL 0 223 #define SIGEV_NONE 1 224 #define SIGEV_THREAD 2 225 #define SIGEV_THREAD_ID 4 226 #ifndef __ARCH_SIGEV_PREAMBLE_SIZE 227 #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t)) 228 #endif 229 #define SIGEV_MAX_SIZE 64 230 #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int)) 231 typedef struct sigevent { 232 sigval_t sigev_value; 233 int sigev_signo; 234 int sigev_notify; 235 union { 236 int _pad[SIGEV_PAD_SIZE]; 237 int _tid; 238 struct { 239 void(* _function) (sigval_t); 240 void * _attribute; 241 } _sigev_thread; 242 } _sigev_un; 243 } sigevent_t; 244 #define sigev_notify_function _sigev_un._sigev_thread._function 245 #define sigev_notify_attributes _sigev_un._sigev_thread._attribute 246 #define sigev_notify_thread_id _sigev_un._tid 247 #endif 248