signal.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. #endif /* __KERNEL__ */
  82. #define SIG_BLOCK 0 /* for blocking signals */
  83. #define SIG_UNBLOCK 1 /* for unblocking signals */
  84. #define SIG_SETMASK 2 /* for setting the signal mask */
  85. #define SIG_DFL ((__sighandler_t)0) /* default signal handling */
  86. #define SIG_IGN ((__sighandler_t)1) /* ignore signal */
  87. #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
  88. # ifndef __ASSEMBLY__
  89. # include <linux/types.h>
  90. /* Avoid too many header ordering problems. */
  91. struct siginfo;
  92. /* Type of a signal handler. */
  93. #ifdef __LP64__
  94. /* function pointers on 64-bit parisc are pointers to little structs and the
  95. * compiler doesn't support code which changes or tests the address of
  96. * the function in the little struct. This is really ugly -PB
  97. */
  98. typedef char __user *__sighandler_t;
  99. #else
  100. typedef void __signalfn_t(int);
  101. typedef __signalfn_t __user *__sighandler_t;
  102. #endif
  103. typedef struct sigaltstack {
  104. void __user *ss_sp;
  105. int ss_flags;
  106. size_t ss_size;
  107. } stack_t;
  108. #ifdef __KERNEL__
  109. /* Most things should be clean enough to redefine this at will, if care
  110. is taken to make libc match. */
  111. typedef unsigned long old_sigset_t; /* at least 32 bits */
  112. typedef struct {
  113. /* next_signal() assumes this is a long - no choice */
  114. unsigned long sig[_NSIG_WORDS];
  115. } sigset_t;
  116. struct sigaction {
  117. __sighandler_t sa_handler;
  118. unsigned long sa_flags;
  119. sigset_t sa_mask; /* mask last for extensibility */
  120. };
  121. struct k_sigaction {
  122. struct sigaction sa;
  123. };
  124. #define ptrace_signal_deliver(regs, cookie) do { } while (0)
  125. #include <asm/sigcontext.h>
  126. #endif /* __KERNEL__ */
  127. #endif /* !__ASSEMBLY */
  128. #endif /* _ASM_PARISC_SIGNAL_H */