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 __user * 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 __user * _addr; 62 #ifdef __ARCH_SI_TRAPNO 63 int _trapno; 64 #endif 65 #ifdef __ia64__ 66 int _imm; 67 unsigned int _flags; 68 unsigned long _isr; 69 #endif 70 #define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? sizeof(short) : __alignof__(void *)) 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 }; 106 } __ARCH_SI_ATTRIBUTES siginfo_t; 107 #define si_pid _sifields._kill._pid 108 #define si_uid _sifields._kill._uid 109 #define si_tid _sifields._timer._tid 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 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 118 #define si_addr _sifields._sigfault._addr 119 #ifdef __ARCH_SI_TRAPNO 120 #define si_trapno _sifields._sigfault._trapno 121 #endif 122 #define si_addr_lsb _sifields._sigfault._addr_lsb 123 #define si_lower _sifields._sigfault._addr_bnd._lower 124 #define si_upper _sifields._sigfault._addr_bnd._upper 125 #define si_pkey _sifields._sigfault._addr_pkey._pkey 126 #define si_band _sifields._sigpoll._band 127 #define si_fd _sifields._sigpoll._fd 128 #define si_call_addr _sifields._sigsys._call_addr 129 #define si_syscall _sifields._sigsys._syscall 130 #define si_arch _sifields._sigsys._arch 131 #define SI_USER 0 132 #define SI_KERNEL 0x80 133 #define SI_QUEUE - 1 134 #define SI_TIMER - 2 135 #define SI_MESGQ - 3 136 #define SI_ASYNCIO - 4 137 #define SI_SIGIO - 5 138 #define SI_TKILL - 6 139 #define SI_DETHREAD - 7 140 #define SI_ASYNCNL - 60 141 #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) 142 #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) 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 151 #define ILL_BADIADDR 9 152 #define __ILL_BREAK 10 153 #define __ILL_BNDMOD 11 154 #define NSIGILL 11 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 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 171 #define SEGV_MAPERR 1 172 #define SEGV_ACCERR 2 173 #define SEGV_BNDERR 3 174 #ifdef __ia64__ 175 #define __SEGV_PSTKOVF 4 176 #else 177 #define SEGV_PKUERR 4 178 #endif 179 #define SEGV_ACCADI 5 180 #define SEGV_ADIDERR 6 181 #define SEGV_ADIPERR 7 182 #define NSIGSEGV 7 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 188 #define NSIGBUS 5 189 #define TRAP_BRKPT 1 190 #define TRAP_TRACE 2 191 #define TRAP_BRANCH 3 192 #define TRAP_HWBKPT 4 193 #define TRAP_UNK 5 194 #define NSIGTRAP 5 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 201 #define NSIGCHLD 6 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 208 #define NSIGPOLL 6 209 #define SYS_SECCOMP 1 210 #define NSIGSYS 1 211 #define EMT_TAGOVF 1 212 #define NSIGEMT 1 213 #define SIGEV_SIGNAL 0 214 #define SIGEV_NONE 1 215 #define SIGEV_THREAD 2 216 #define SIGEV_THREAD_ID 4 217 #ifndef __ARCH_SIGEV_PREAMBLE_SIZE 218 #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t)) 219 #endif 220 #define SIGEV_MAX_SIZE 64 221 #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int)) 222 typedef struct sigevent { 223 sigval_t sigev_value; 224 int sigev_signo; 225 int sigev_notify; 226 union { 227 int _pad[SIGEV_PAD_SIZE]; 228 int _tid; 229 struct { 230 void(* _function) (sigval_t); 231 void * _attribute; 232 } _sigev_thread; 233 } _sigev_un; 234 } sigevent_t; 235 #define sigev_notify_function _sigev_un._sigev_thread._function 236 #define sigev_notify_attributes _sigev_un._sigev_thread._attribute 237 #define sigev_notify_thread_id _sigev_un._tid 238 #endif 239