siginfo-consts.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. /* siginfo_t constants. Stub version.
  2. Copyright (C) 1997-2019 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <http://www.gnu.org/licenses/>. */
  15. #ifndef _BITS_SIGINFO_CONSTS_H
  16. #define _BITS_SIGINFO_CONSTS_H 1
  17. /* Values for `si_code'. Positive values are reserved for kernel-generated
  18. signals. */
  19. enum
  20. {
  21. SI_ASYNCIO = -4, /* Sent by AIO completion. */
  22. # define SI_ASYNCIO SI_ASYNCIO
  23. SI_MESGQ, /* Sent by real time mesq state change. */
  24. # define SI_MESGQ SI_MESGQ
  25. SI_TIMER, /* Sent by timer expiration. */
  26. # define SI_TIMER SI_TIMER
  27. SI_QUEUE, /* Sent by sigqueue. */
  28. # define SI_QUEUE SI_QUEUE
  29. SI_USER /* Sent by kill, sigsend, raise. */
  30. # define SI_USER SI_USER
  31. };
  32. # if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
  33. /* `si_code' values for SIGILL signal. */
  34. enum
  35. {
  36. ILL_ILLOPC = 1, /* Illegal opcode. */
  37. # define ILL_ILLOPC ILL_ILLOPC
  38. ILL_ILLOPN, /* Illegal operand. */
  39. # define ILL_ILLOPN ILL_ILLOPN
  40. ILL_ILLADR, /* Illegal addressing mode. */
  41. # define ILL_ILLADR ILL_ILLADR
  42. ILL_ILLTRP, /* Illegal trap. */
  43. # define ILL_ILLTRP ILL_ILLTRP
  44. ILL_PRVOPC, /* Privileged opcode. */
  45. # define ILL_PRVOPC ILL_PRVOPC
  46. ILL_PRVREG, /* Privileged register. */
  47. # define ILL_PRVREG ILL_PRVREG
  48. ILL_COPROC, /* Coprocessor error. */
  49. # define ILL_COPROC ILL_COPROC
  50. ILL_BADSTK /* Internal stack error. */
  51. # define ILL_BADSTK ILL_BADSTK
  52. };
  53. /* `si_code' values for SIGFPE signal. */
  54. enum
  55. {
  56. FPE_INTDIV = 1, /* Integer divide by zero. */
  57. # define FPE_INTDIV FPE_INTDIV
  58. FPE_INTOVF, /* Integer overflow. */
  59. # define FPE_INTOVF FPE_INTOVF
  60. FPE_FLTDIV, /* Floating point divide by zero. */
  61. # define FPE_FLTDIV FPE_FLTDIV
  62. FPE_FLTOVF, /* Floating point overflow. */
  63. # define FPE_FLTOVF FPE_FLTOVF
  64. FPE_FLTUND, /* Floating point underflow. */
  65. # define FPE_FLTUND FPE_FLTUND
  66. FPE_FLTRES, /* Floating point inexact result. */
  67. # define FPE_FLTRES FPE_FLTRES
  68. FPE_FLTINV, /* Floating point invalid operation. */
  69. # define FPE_FLTINV FPE_FLTINV
  70. FPE_FLTSUB /* Subscript out of range. */
  71. # define FPE_FLTSUB FPE_FLTSUB
  72. };
  73. /* `si_code' values for SIGSEGV signal. */
  74. enum
  75. {
  76. SEGV_MAPERR = 1, /* Address not mapped to object. */
  77. # define SEGV_MAPERR SEGV_MAPERR
  78. SEGV_ACCERR /* Invalid permissions for mapped object. */
  79. # define SEGV_ACCERR SEGV_ACCERR
  80. };
  81. /* `si_code' values for SIGBUS signal. */
  82. enum
  83. {
  84. BUS_ADRALN = 1, /* Invalid address alignment. */
  85. # define BUS_ADRALN BUS_ADRALN
  86. BUS_ADRERR, /* Non-existant physical address. */
  87. # define BUS_ADRERR BUS_ADRERR
  88. BUS_OBJERR /* Object specific hardware error. */
  89. # define BUS_OBJERR BUS_OBJERR
  90. };
  91. # endif
  92. # ifdef __USE_XOPEN_EXTENDED
  93. /* `si_code' values for SIGTRAP signal. */
  94. enum
  95. {
  96. TRAP_BRKPT = 1, /* Process breakpoint. */
  97. # define TRAP_BRKPT TRAP_BRKPT
  98. TRAP_TRACE /* Process trace trap. */
  99. # define TRAP_TRACE TRAP_TRACE
  100. };
  101. # endif
  102. # if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
  103. /* `si_code' values for SIGCHLD signal. */
  104. enum
  105. {
  106. CLD_EXITED = 1, /* Child has exited. */
  107. # define CLD_EXITED CLD_EXITED
  108. CLD_KILLED, /* Child was killed. */
  109. # define CLD_KILLED CLD_KILLED
  110. CLD_DUMPED, /* Child terminated abnormally. */
  111. # define CLD_DUMPED CLD_DUMPED
  112. CLD_TRAPPED, /* Traced child has trapped. */
  113. # define CLD_TRAPPED CLD_TRAPPED
  114. CLD_STOPPED, /* Child has stopped. */
  115. # define CLD_STOPPED CLD_STOPPED
  116. CLD_CONTINUED /* Stopped child has continued. */
  117. # define CLD_CONTINUED CLD_CONTINUED
  118. };
  119. /* `si_code' values for SIGPOLL signal. */
  120. enum
  121. {
  122. POLL_IN = 1, /* Data input available. */
  123. # define POLL_IN POLL_IN
  124. POLL_OUT, /* Output buffers available. */
  125. # define POLL_OUT POLL_OUT
  126. POLL_MSG, /* Input message available. */
  127. # define POLL_MSG POLL_MSG
  128. POLL_ERR, /* I/O error. */
  129. # define POLL_ERR POLL_ERR
  130. POLL_PRI, /* High priority input available. */
  131. # define POLL_PRI POLL_PRI
  132. POLL_HUP /* Device disconnected. */
  133. # define POLL_HUP POLL_HUP
  134. };
  135. # endif
  136. #endif