1 /* 2 * Based on <asm-i386/siginfo.h>. 3 * 4 * Modified 1998-2002 5 * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co 6 */ 7 #ifndef _UAPI_ASM_IA64_SIGINFO_H 8 #define _UAPI_ASM_IA64_SIGINFO_H 9 10 11 #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) 12 13 #define HAVE_ARCH_SIGINFO_T 14 #define HAVE_ARCH_COPY_SIGINFO_TO_USER 15 16 #include <asm-generic/siginfo.h> 17 18 typedef struct siginfo { 19 int si_signo; 20 int si_errno; 21 int si_code; 22 int __pad0; 23 24 union { 25 int _pad[SI_PAD_SIZE]; 26 27 /* kill() */ 28 struct { 29 pid_t _pid; /* sender's pid */ 30 uid_t _uid; /* sender's uid */ 31 } _kill; 32 33 /* POSIX.1b timers */ 34 struct { 35 timer_t _tid; /* timer id */ 36 int _overrun; /* overrun count */ 37 char _pad[sizeof(__ARCH_SI_UID_T) - sizeof(int)]; 38 sigval_t _sigval; /* must overlay ._rt._sigval! */ 39 int _sys_private; /* not to be passed to user */ 40 } _timer; 41 42 /* POSIX.1b signals */ 43 struct { 44 pid_t _pid; /* sender's pid */ 45 uid_t _uid; /* sender's uid */ 46 sigval_t _sigval; 47 } _rt; 48 49 /* SIGCHLD */ 50 struct { 51 pid_t _pid; /* which child */ 52 uid_t _uid; /* sender's uid */ 53 int _status; /* exit code */ 54 clock_t _utime; 55 clock_t _stime; 56 } _sigchld; 57 58 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ 59 struct { 60 void __user *_addr; /* faulting insn/memory ref. */ 61 int _imm; /* immediate value for "break" */ 62 unsigned int _flags; /* see below */ 63 unsigned long _isr; /* isr */ 64 short _addr_lsb; /* lsb of faulting address */ 65 union { 66 /* used when si_code=SEGV_BNDERR */ 67 struct { 68 void __user *_lower; 69 void __user *_upper; 70 } _addr_bnd; 71 /* used when si_code=SEGV_PKUERR */ 72 __u32 _pkey; 73 }; 74 } _sigfault; 75 76 /* SIGPOLL */ 77 struct { 78 long _band; /* POLL_IN, POLL_OUT, POLL_MSG (XPG requires a "long") */ 79 int _fd; 80 } _sigpoll; 81 } _sifields; 82 } siginfo_t; 83 84 #define si_imm _sifields._sigfault._imm /* as per UNIX SysV ABI spec */ 85 #define si_flags _sifields._sigfault._flags 86 /* 87 * si_isr is valid for SIGILL, SIGFPE, SIGSEGV, SIGBUS, and SIGTRAP provided that 88 * si_code is non-zero and __ISR_VALID is set in si_flags. 89 */ 90 #define si_isr _sifields._sigfault._isr 91 92 /* 93 * Flag values for si_flags: 94 */ 95 #define __ISR_VALID_BIT 0 96 #define __ISR_VALID (1 << __ISR_VALID_BIT) 97 98 /* 99 * SIGILL si_codes 100 */ 101 #define ILL_BADIADDR (__SI_FAULT|9) /* unimplemented instruction address */ 102 #define __ILL_BREAK (__SI_FAULT|10) /* illegal break */ 103 #define __ILL_BNDMOD (__SI_FAULT|11) /* bundle-update (modification) in progress */ 104 #undef NSIGILL 105 #define NSIGILL 11 106 107 /* 108 * SIGFPE si_codes 109 */ 110 #define __FPE_DECOVF (__SI_FAULT|9) /* decimal overflow */ 111 #define __FPE_DECDIV (__SI_FAULT|10) /* decimal division by zero */ 112 #define __FPE_DECERR (__SI_FAULT|11) /* packed decimal error */ 113 #define __FPE_INVASC (__SI_FAULT|12) /* invalid ASCII digit */ 114 #define __FPE_INVDEC (__SI_FAULT|13) /* invalid decimal digit */ 115 #undef NSIGFPE 116 #define NSIGFPE 13 117 118 /* 119 * SIGSEGV si_codes 120 */ 121 #define __SEGV_PSTKOVF (__SI_FAULT|4) /* paragraph stack overflow */ 122 #undef NSIGSEGV 123 #define NSIGSEGV 4 124 125 #undef NSIGTRAP 126 #define NSIGTRAP 4 127 128 129 #endif /* _UAPI_ASM_IA64_SIGINFO_H */ 130