siginfo.h 3.1 KB

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