signal.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. #ifndef _ASM_IA64_SIGNAL_H
  2. #define _ASM_IA64_SIGNAL_H
  3. /*
  4. * Modified 1998-2001, 2003
  5. * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
  6. *
  7. * Unfortunately, this file is being included by bits/signal.h in
  8. * glibc-2.x. Hence the #ifdef __KERNEL__ ugliness.
  9. */
  10. #define SIGHUP 1
  11. #define SIGINT 2
  12. #define SIGQUIT 3
  13. #define SIGILL 4
  14. #define SIGTRAP 5
  15. #define SIGABRT 6
  16. #define SIGIOT 6
  17. #define SIGBUS 7
  18. #define SIGFPE 8
  19. #define SIGKILL 9
  20. #define SIGUSR1 10
  21. #define SIGSEGV 11
  22. #define SIGUSR2 12
  23. #define SIGPIPE 13
  24. #define SIGALRM 14
  25. #define SIGTERM 15
  26. #define SIGSTKFLT 16
  27. #define SIGCHLD 17
  28. #define SIGCONT 18
  29. #define SIGSTOP 19
  30. #define SIGTSTP 20
  31. #define SIGTTIN 21
  32. #define SIGTTOU 22
  33. #define SIGURG 23
  34. #define SIGXCPU 24
  35. #define SIGXFSZ 25
  36. #define SIGVTALRM 26
  37. #define SIGPROF 27
  38. #define SIGWINCH 28
  39. #define SIGIO 29
  40. #define SIGPOLL SIGIO
  41. /*
  42. #define SIGLOST 29
  43. */
  44. #define SIGPWR 30
  45. #define SIGSYS 31
  46. /* signal 31 is no longer "unused", but the SIGUNUSED macro remains for backwards compatibility */
  47. #define SIGUNUSED 31
  48. /* These should not be considered constants from userland. */
  49. #define SIGRTMIN 32
  50. #define SIGRTMAX _NSIG
  51. /*
  52. * SA_FLAGS values:
  53. *
  54. * SA_ONSTACK indicates that a registered stack_t will be used.
  55. * SA_RESTART flag to get restarting signals (which were the default long ago)
  56. * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
  57. * SA_RESETHAND clears the handler when the signal is delivered.
  58. * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
  59. * SA_NODEFER prevents the current signal from being masked in the handler.
  60. *
  61. * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
  62. * Unix names RESETHAND and NODEFER respectively.
  63. */
  64. #define SA_NOCLDSTOP 0x00000001
  65. #define SA_NOCLDWAIT 0x00000002
  66. #define SA_SIGINFO 0x00000004
  67. #define SA_ONSTACK 0x08000000
  68. #define SA_RESTART 0x10000000
  69. #define SA_NODEFER 0x40000000
  70. #define SA_RESETHAND 0x80000000
  71. #define SA_NOMASK SA_NODEFER
  72. #define SA_ONESHOT SA_RESETHAND
  73. #define SA_RESTORER 0x04000000
  74. /*
  75. * sigaltstack controls
  76. */
  77. #define SS_ONSTACK 1
  78. #define SS_DISABLE 2
  79. /*
  80. * The minimum stack size needs to be fairly large because we want to
  81. * be sure that an app compiled for today's CPUs will continue to run
  82. * on all future CPU models. The CPU model matters because the signal
  83. * frame needs to have space for the complete machine state, including
  84. * all physical stacked registers. The number of physical stacked
  85. * registers is CPU model dependent, but given that the width of
  86. * ar.rsc.loadrs is 14 bits, we can assume that they'll never take up
  87. * more than 16KB of space.
  88. */
  89. #if 1
  90. /*
  91. * This is a stupid typo: the value was _meant_ to be 131072 (0x20000), but I typed it
  92. * in wrong. ;-( To preserve backwards compatibility, we leave the kernel at the
  93. * incorrect value and fix libc only.
  94. */
  95. # define MINSIGSTKSZ 131027 /* min. stack size for sigaltstack() */
  96. #else
  97. # define MINSIGSTKSZ 131072 /* min. stack size for sigaltstack() */
  98. #endif
  99. #define SIGSTKSZ 262144 /* default stack size for sigaltstack() */
  100. #ifdef __KERNEL__
  101. #define _NSIG 64
  102. #define _NSIG_BPW 64
  103. #define _NSIG_WORDS (_NSIG / _NSIG_BPW)
  104. #endif /* __KERNEL__ */
  105. #include <asm-generic/signal-defs.h>
  106. # ifndef __ASSEMBLY__
  107. # include <linux/types.h>
  108. /* Avoid too many header ordering problems. */
  109. struct siginfo;
  110. typedef struct sigaltstack {
  111. void __user *ss_sp;
  112. int ss_flags;
  113. size_t ss_size;
  114. } stack_t;
  115. #ifdef __KERNEL__
  116. /* Most things should be clean enough to redefine this at will, if care
  117. is taken to make libc match. */
  118. typedef unsigned long old_sigset_t;
  119. typedef struct {
  120. unsigned long sig[_NSIG_WORDS];
  121. } sigset_t;
  122. struct sigaction {
  123. __sighandler_t sa_handler;
  124. unsigned long sa_flags;
  125. sigset_t sa_mask; /* mask last for extensibility */
  126. };
  127. struct k_sigaction {
  128. struct sigaction sa;
  129. };
  130. # include <asm/sigcontext.h>
  131. #define ptrace_signal_deliver(regs, cookie) do { } while (0)
  132. #endif /* __KERNEL__ */
  133. # endif /* !__ASSEMBLY__ */
  134. #endif /* _ASM_IA64_SIGNAL_H */