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 #ifndef __ARCH_SI_PREAMBLE_SIZE 28 #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) 29 #endif 30 #define SI_MAX_SIZE 128 31 #ifndef SI_PAD_SIZE 32 #define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int)) 33 #endif 34 #ifndef __ARCH_SI_UID_T 35 #define __ARCH_SI_UID_T __kernel_uid32_t 36 #endif 37 #ifndef __ARCH_SI_BAND_T 38 #define __ARCH_SI_BAND_T long 39 #endif 40 #ifndef __ARCH_SI_CLOCK_T 41 #define __ARCH_SI_CLOCK_T __kernel_clock_t 42 #endif 43 #ifndef __ARCH_SI_ATTRIBUTES 44 #define __ARCH_SI_ATTRIBUTES 45 #endif 46 #ifndef HAVE_ARCH_SIGINFO_T 47 typedef struct siginfo { 48 int si_signo; 49 int si_errno; 50 int si_code; 51 union { 52 int _pad[SI_PAD_SIZE]; 53 struct { 54 __kernel_pid_t _pid; 55 __ARCH_SI_UID_T _uid; 56 } _kill; 57 struct { 58 __kernel_timer_t _tid; 59 int _overrun; 60 char _pad[sizeof(__ARCH_SI_UID_T) - sizeof(int)]; 61 sigval_t _sigval; 62 int _sys_private; 63 } _timer; 64 struct { 65 __kernel_pid_t _pid; 66 __ARCH_SI_UID_T _uid; 67 sigval_t _sigval; 68 } _rt; 69 struct { 70 __kernel_pid_t _pid; 71 __ARCH_SI_UID_T _uid; 72 int _status; 73 __ARCH_SI_CLOCK_T _utime; 74 __ARCH_SI_CLOCK_T _stime; 75 } _sigchld; 76 struct { 77 void __user * _addr; 78 #ifdef __ARCH_SI_TRAPNO 79 int _trapno; 80 #endif 81 short _addr_lsb; 82 union { 83 struct { 84 void __user * _lower; 85 void __user * _upper; 86 } _addr_bnd; 87 __u32 _pkey; 88 }; 89 } _sigfault; 90 struct { 91 __ARCH_SI_BAND_T _band; 92 int _fd; 93 } _sigpoll; 94 struct { 95 void __user * _call_addr; 96 int _syscall; 97 unsigned int _arch; 98 } _sigsys; 99 } _sifields; 100 } __ARCH_SI_ATTRIBUTES siginfo_t; 101 #define __ARCH_SIGSYS 102 #endif 103 #define si_pid _sifields._kill._pid 104 #define si_uid _sifields._kill._uid 105 #define si_tid _sifields._timer._tid 106 #define si_overrun _sifields._timer._overrun 107 #define si_sys_private _sifields._timer._sys_private 108 #define si_status _sifields._sigchld._status 109 #define si_utime _sifields._sigchld._utime 110 #define si_stime _sifields._sigchld._stime 111 #define si_value _sifields._rt._sigval 112 #define si_int _sifields._rt._sigval.sival_int 113 #define si_ptr _sifields._rt._sigval.sival_ptr 114 #define si_addr _sifields._sigfault._addr 115 #ifdef __ARCH_SI_TRAPNO 116 #define si_trapno _sifields._sigfault._trapno 117 #endif 118 #define si_addr_lsb _sifields._sigfault._addr_lsb 119 #define si_lower _sifields._sigfault._addr_bnd._lower 120 #define si_upper _sifields._sigfault._addr_bnd._upper 121 #define si_pkey _sifields._sigfault._pkey 122 #define si_band _sifields._sigpoll._band 123 #define si_fd _sifields._sigpoll._fd 124 #ifdef __ARCH_SIGSYS 125 #define si_call_addr _sifields._sigsys._call_addr 126 #define si_syscall _sifields._sigsys._syscall 127 #define si_arch _sifields._sigsys._arch 128 #endif 129 #define SI_USER 0 130 #define SI_KERNEL 0x80 131 #define SI_QUEUE - 1 132 #define SI_TIMER - 2 133 #define SI_MESGQ - 3 134 #define SI_ASYNCIO - 4 135 #define SI_SIGIO - 5 136 #define SI_TKILL - 6 137 #define SI_DETHREAD - 7 138 #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) 139 #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) 140 #define ILL_ILLOPC 1 141 #define ILL_ILLOPN 2 142 #define ILL_ILLADR 3 143 #define ILL_ILLTRP 4 144 #define ILL_PRVOPC 5 145 #define ILL_PRVREG 6 146 #define ILL_COPROC 7 147 #define ILL_BADSTK 8 148 #define NSIGILL 8 149 #define FPE_INTDIV 1 150 #define FPE_INTOVF 2 151 #define FPE_FLTDIV 3 152 #define FPE_FLTOVF 4 153 #define FPE_FLTUND 5 154 #define FPE_FLTRES 6 155 #define FPE_FLTINV 7 156 #define FPE_FLTSUB 8 157 #define NSIGFPE 8 158 #define SEGV_MAPERR 1 159 #define SEGV_ACCERR 2 160 #define SEGV_BNDERR 3 161 #define SEGV_PKUERR 4 162 #define NSIGSEGV 4 163 #define BUS_ADRALN 1 164 #define BUS_ADRERR 2 165 #define BUS_OBJERR 3 166 #define BUS_MCEERR_AR 4 167 #define BUS_MCEERR_AO 5 168 #define NSIGBUS 5 169 #define TRAP_BRKPT 1 170 #define TRAP_TRACE 2 171 #define TRAP_BRANCH 3 172 #define TRAP_HWBKPT 4 173 #define NSIGTRAP 4 174 #define CLD_EXITED 1 175 #define CLD_KILLED 2 176 #define CLD_DUMPED 3 177 #define CLD_TRAPPED 4 178 #define CLD_STOPPED 5 179 #define CLD_CONTINUED 6 180 #define NSIGCHLD 6 181 #define POLL_IN 1 182 #define POLL_OUT 2 183 #define POLL_MSG 3 184 #define POLL_ERR 4 185 #define POLL_PRI 5 186 #define POLL_HUP 6 187 #define NSIGPOLL 6 188 #define SYS_SECCOMP 1 189 #define NSIGSYS 1 190 #define SIGEV_SIGNAL 0 191 #define SIGEV_NONE 1 192 #define SIGEV_THREAD 2 193 #define SIGEV_THREAD_ID 4 194 #ifndef __ARCH_SIGEV_PREAMBLE_SIZE 195 #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t)) 196 #endif 197 #define SIGEV_MAX_SIZE 64 198 #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int)) 199 typedef struct sigevent { 200 sigval_t sigev_value; 201 int sigev_signo; 202 int sigev_notify; 203 union { 204 int _pad[SIGEV_PAD_SIZE]; 205 int _tid; 206 struct { 207 void(* _function) (sigval_t); 208 void * _attribute; 209 } _sigev_thread; 210 } _sigev_un; 211 } sigevent_t; 212 #define sigev_notify_function _sigev_un._sigev_thread._function 213 #define sigev_notify_attributes _sigev_un._sigev_thread._attribute 214 #define sigev_notify_thread_id _sigev_un._tid 215 #endif 216