1 /* 2 * This file is auto-generated. Modifications will be lost. 3 * 4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ 5 * for more information. 6 */ 7 #ifndef _UAPI_ASM_GENERIC_SIGINFO_H 8 #define _UAPI_ASM_GENERIC_SIGINFO_H 9 #include <linux/compiler.h> 10 #include <linux/types.h> 11 typedef union sigval { 12 int sival_int; 13 void * sival_ptr; 14 } sigval_t; 15 #define SI_MAX_SIZE 128 16 #ifndef __ARCH_SI_BAND_T 17 #define __ARCH_SI_BAND_T long 18 #endif 19 #ifndef __ARCH_SI_CLOCK_T 20 #define __ARCH_SI_CLOCK_T __kernel_clock_t 21 #endif 22 #ifndef __ARCH_SI_ATTRIBUTES 23 #define __ARCH_SI_ATTRIBUTES 24 #endif 25 union __sifields { 26 struct { 27 __kernel_pid_t _pid; 28 __kernel_uid32_t _uid; 29 } _kill; 30 struct { 31 __kernel_timer_t _tid; 32 int _overrun; 33 sigval_t _sigval; 34 int _sys_private; 35 } _timer; 36 struct { 37 __kernel_pid_t _pid; 38 __kernel_uid32_t _uid; 39 sigval_t _sigval; 40 } _rt; 41 struct { 42 __kernel_pid_t _pid; 43 __kernel_uid32_t _uid; 44 int _status; 45 __ARCH_SI_CLOCK_T _utime; 46 __ARCH_SI_CLOCK_T _stime; 47 } _sigchld; 48 struct { 49 void * _addr; 50 #define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? sizeof(short) : __alignof__(void *)) 51 union { 52 int _trapno; 53 short _addr_lsb; 54 struct { 55 char _dummy_bnd[__ADDR_BND_PKEY_PAD]; 56 void * _lower; 57 void * _upper; 58 } _addr_bnd; 59 struct { 60 char _dummy_pkey[__ADDR_BND_PKEY_PAD]; 61 __u32 _pkey; 62 } _addr_pkey; 63 struct { 64 unsigned long _data; 65 __u32 _type; 66 __u32 _flags; 67 } _perf; 68 }; 69 } _sigfault; 70 struct { 71 __ARCH_SI_BAND_T _band; 72 int _fd; 73 } _sigpoll; 74 struct { 75 void * _call_addr; 76 int _syscall; 77 unsigned int _arch; 78 } _sigsys; 79 }; 80 #ifndef __ARCH_HAS_SWAPPED_SIGINFO 81 #define __SIGINFO struct { int si_signo; int si_errno; int si_code; union __sifields _sifields; \ 82 } 83 #else 84 #define __SIGINFO struct { int si_signo; int si_code; int si_errno; union __sifields _sifields; \ 85 } 86 #endif 87 typedef struct siginfo { 88 union { 89 __SIGINFO; 90 int _si_pad[SI_MAX_SIZE / sizeof(int)]; 91 }; 92 } __ARCH_SI_ATTRIBUTES siginfo_t; 93 #define si_pid _sifields._kill._pid 94 #define si_uid _sifields._kill._uid 95 #define si_tid _sifields._timer._tid 96 #define si_overrun _sifields._timer._overrun 97 #define si_sys_private _sifields._timer._sys_private 98 #define si_status _sifields._sigchld._status 99 #define si_utime _sifields._sigchld._utime 100 #define si_stime _sifields._sigchld._stime 101 #define si_value _sifields._rt._sigval 102 #define si_int _sifields._rt._sigval.sival_int 103 #define si_ptr _sifields._rt._sigval.sival_ptr 104 #define si_addr _sifields._sigfault._addr 105 #define si_trapno _sifields._sigfault._trapno 106 #define si_addr_lsb _sifields._sigfault._addr_lsb 107 #define si_lower _sifields._sigfault._addr_bnd._lower 108 #define si_upper _sifields._sigfault._addr_bnd._upper 109 #define si_pkey _sifields._sigfault._addr_pkey._pkey 110 #define si_perf_data _sifields._sigfault._perf._data 111 #define si_perf_type _sifields._sigfault._perf._type 112 #define si_perf_flags _sifields._sigfault._perf._flags 113 #define si_band _sifields._sigpoll._band 114 #define si_fd _sifields._sigpoll._fd 115 #define si_call_addr _sifields._sigsys._call_addr 116 #define si_syscall _sifields._sigsys._syscall 117 #define si_arch _sifields._sigsys._arch 118 #define SI_USER 0 119 #define SI_KERNEL 0x80 120 #define SI_QUEUE - 1 121 #define SI_TIMER - 2 122 #define SI_MESGQ - 3 123 #define SI_ASYNCIO - 4 124 #define SI_SIGIO - 5 125 #define SI_TKILL - 6 126 #define SI_DETHREAD - 7 127 #define SI_ASYNCNL - 60 128 #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) 129 #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) 130 #define ILL_ILLOPC 1 131 #define ILL_ILLOPN 2 132 #define ILL_ILLADR 3 133 #define ILL_ILLTRP 4 134 #define ILL_PRVOPC 5 135 #define ILL_PRVREG 6 136 #define ILL_COPROC 7 137 #define ILL_BADSTK 8 138 #define ILL_BADIADDR 9 139 #define __ILL_BREAK 10 140 #define __ILL_BNDMOD 11 141 #define NSIGILL 11 142 #define FPE_INTDIV 1 143 #define FPE_INTOVF 2 144 #define FPE_FLTDIV 3 145 #define FPE_FLTOVF 4 146 #define FPE_FLTUND 5 147 #define FPE_FLTRES 6 148 #define FPE_FLTINV 7 149 #define FPE_FLTSUB 8 150 #define __FPE_DECOVF 9 151 #define __FPE_DECDIV 10 152 #define __FPE_DECERR 11 153 #define __FPE_INVASC 12 154 #define __FPE_INVDEC 13 155 #define FPE_FLTUNK 14 156 #define FPE_CONDTRAP 15 157 #define NSIGFPE 15 158 #define SEGV_MAPERR 1 159 #define SEGV_ACCERR 2 160 #define SEGV_BNDERR 3 161 #ifdef __ia64__ 162 #define __SEGV_PSTKOVF 4 163 #else 164 #define SEGV_PKUERR 4 165 #endif 166 #define SEGV_ACCADI 5 167 #define SEGV_ADIDERR 6 168 #define SEGV_ADIPERR 7 169 #define SEGV_MTEAERR 8 170 #define SEGV_MTESERR 9 171 #define SEGV_CPERR 10 172 #define NSIGSEGV 10 173 #define BUS_ADRALN 1 174 #define BUS_ADRERR 2 175 #define BUS_OBJERR 3 176 #define BUS_MCEERR_AR 4 177 #define BUS_MCEERR_AO 5 178 #define NSIGBUS 5 179 #define TRAP_BRKPT 1 180 #define TRAP_TRACE 2 181 #define TRAP_BRANCH 3 182 #define TRAP_HWBKPT 4 183 #define TRAP_UNK 5 184 #define TRAP_PERF 6 185 #define NSIGTRAP 6 186 #define TRAP_PERF_FLAG_ASYNC (1u << 0) 187 #define CLD_EXITED 1 188 #define CLD_KILLED 2 189 #define CLD_DUMPED 3 190 #define CLD_TRAPPED 4 191 #define CLD_STOPPED 5 192 #define CLD_CONTINUED 6 193 #define NSIGCHLD 6 194 #define POLL_IN 1 195 #define POLL_OUT 2 196 #define POLL_MSG 3 197 #define POLL_ERR 4 198 #define POLL_PRI 5 199 #define POLL_HUP 6 200 #define NSIGPOLL 6 201 #define SYS_SECCOMP 1 202 #define SYS_USER_DISPATCH 2 203 #define NSIGSYS 2 204 #define EMT_TAGOVF 1 205 #define NSIGEMT 1 206 #define SIGEV_SIGNAL 0 207 #define SIGEV_NONE 1 208 #define SIGEV_THREAD 2 209 #define SIGEV_THREAD_ID 4 210 #ifndef __ARCH_SIGEV_PREAMBLE_SIZE 211 #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t)) 212 #endif 213 #define SIGEV_MAX_SIZE 64 214 #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int)) 215 typedef struct sigevent { 216 sigval_t sigev_value; 217 int sigev_signo; 218 int sigev_notify; 219 union { 220 int _pad[SIGEV_PAD_SIZE]; 221 int _tid; 222 struct { 223 void(* _function) (sigval_t); 224 void * _attribute; 225 } _sigev_thread; 226 } _sigev_un; 227 } sigevent_t; 228 #define sigev_notify_function _sigev_un._sigev_thread._function 229 #define sigev_notify_attributes _sigev_un._sigev_thread._attribute 230 #define sigev_notify_thread_id _sigev_un._tid 231 #endif 232