signal.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. #ifndef _ASM_PARISC_SIGNAL_H
  2. #define _ASM_PARISC_SIGNAL_H
  3. #define SIGHUP 1
  4. #define SIGINT 2
  5. #define SIGQUIT 3
  6. #define SIGILL 4
  7. #define SIGTRAP 5
  8. #define SIGABRT 6
  9. #define SIGIOT 6
  10. #define SIGEMT 7
  11. #define SIGFPE 8
  12. #define SIGKILL 9
  13. #define SIGBUS 10
  14. #define SIGSEGV 11
  15. #define SIGSYS 12 /* Linux doesn't use this */
  16. #define SIGPIPE 13
  17. #define SIGALRM 14
  18. #define SIGTERM 15
  19. #define SIGUSR1 16
  20. #define SIGUSR2 17
  21. #define SIGCHLD 18
  22. #define SIGPWR 19
  23. #define SIGVTALRM 20
  24. #define SIGPROF 21
  25. #define SIGIO 22
  26. #define SIGPOLL SIGIO
  27. #define SIGWINCH 23
  28. #define SIGSTOP 24
  29. #define SIGTSTP 25
  30. #define SIGCONT 26
  31. #define SIGTTIN 27
  32. #define SIGTTOU 28
  33. #define SIGURG 29
  34. #define SIGLOST 30 /* Linux doesn't use this either */
  35. #define SIGUNUSED 31
  36. #define SIGRESERVE SIGUNUSED
  37. #define SIGXCPU 33
  38. #define SIGXFSZ 34
  39. #define SIGSTKFLT 36
  40. /* These should not be considered constants from userland. */
  41. #define SIGRTMIN 37
  42. #define SIGRTMAX _NSIG /* it's 44 under HP/UX */
  43. /*
  44. * SA_FLAGS values:
  45. *
  46. * SA_ONSTACK indicates that a registered stack_t will be used.
  47. * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
  48. * SA_RESTART flag to get restarting signals (which were the default long ago)
  49. * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
  50. * SA_RESETHAND clears the handler when the signal is delivered.
  51. * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
  52. * SA_NODEFER prevents the current signal from being masked in the handler.
  53. *
  54. * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
  55. * Unix names RESETHAND and NODEFER respectively.
  56. */
  57. #define SA_ONSTACK 0x00000001
  58. #define SA_RESETHAND 0x00000004
  59. #define SA_NOCLDSTOP 0x00000008
  60. #define SA_SIGINFO 0x00000010
  61. #define SA_NODEFER 0x00000020
  62. #define SA_RESTART 0x00000040
  63. #define SA_NOCLDWAIT 0x00000080
  64. #define _SA_SIGGFAULT 0x00000100 /* HPUX */
  65. #define SA_NOMASK SA_NODEFER
  66. #define SA_ONESHOT SA_RESETHAND
  67. #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
  68. #define SA_RESTORER 0x04000000 /* obsolete -- ignored */
  69. /*
  70. * sigaltstack controls
  71. */
  72. #define SS_ONSTACK 1
  73. #define SS_DISABLE 2
  74. #define MINSIGSTKSZ 2048
  75. #define SIGSTKSZ 8192
  76. #ifdef __KERNEL__
  77. #define _NSIG 64
  78. /* bits-per-word, where word apparently means 'long' not 'int' */
  79. #define _NSIG_BPW BITS_PER_LONG
  80. #define _NSIG_WORDS (_NSIG / _NSIG_BPW)
  81. /*
  82. * These values of sa_flags are used only by the kernel as part of the
  83. * irq handling routines.
  84. *
  85. * SA_INTERRUPT is also used by the irq handling routines.
  86. * SA_SHIRQ is for shared interrupt support on PCI and EISA.
  87. */
  88. #define SA_PROBE SA_ONESHOT
  89. #define SA_SAMPLE_RANDOM SA_RESTART
  90. #define SA_SHIRQ 0x04000000
  91. #endif /* __KERNEL__ */
  92. #define SIG_BLOCK 0 /* for blocking signals */
  93. #define SIG_UNBLOCK 1 /* for unblocking signals */
  94. #define SIG_SETMASK 2 /* for setting the signal mask */
  95. #define SIG_DFL ((__sighandler_t)0) /* default signal handling */
  96. #define SIG_IGN ((__sighandler_t)1) /* ignore signal */
  97. #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
  98. # ifndef __ASSEMBLY__
  99. # include <linux/types.h>
  100. /* Avoid too many header ordering problems. */
  101. struct siginfo;
  102. /* Type of a signal handler. */
  103. #ifdef __LP64__
  104. /* function pointers on 64-bit parisc are pointers to little structs and the
  105. * compiler doesn't support code which changes or tests the address of
  106. * the function in the little struct. This is really ugly -PB
  107. */
  108. typedef char __user *__sighandler_t;
  109. #else
  110. typedef void __signalfn_t(int);
  111. typedef __signalfn_t __user *__sighandler_t;
  112. #endif
  113. typedef struct sigaltstack {
  114. void __user *ss_sp;
  115. int ss_flags;
  116. size_t ss_size;
  117. } stack_t;
  118. #ifdef __KERNEL__
  119. /* Most things should be clean enough to redefine this at will, if care
  120. is taken to make libc match. */
  121. typedef unsigned long old_sigset_t; /* at least 32 bits */
  122. typedef struct {
  123. /* next_signal() assumes this is a long - no choice */
  124. unsigned long sig[_NSIG_WORDS];
  125. } sigset_t;
  126. struct sigaction {
  127. __sighandler_t sa_handler;
  128. unsigned long sa_flags;
  129. sigset_t sa_mask; /* mask last for extensibility */
  130. };
  131. struct k_sigaction {
  132. struct sigaction sa;
  133. };
  134. #define ptrace_signal_deliver(regs, cookie) do { } while (0)
  135. #include <asm/sigcontext.h>
  136. #endif /* __KERNEL__ */
  137. #endif /* !__ASSEMBLY */
  138. #endif /* _ASM_PARISC_SIGNAL_H */