signal.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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_RESTART flag to get restarting signals (which were the default long ago)
  48. * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
  49. * SA_RESETHAND clears the handler when the signal is delivered.
  50. * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
  51. * SA_NODEFER prevents the current signal from being masked in the handler.
  52. *
  53. * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
  54. * Unix names RESETHAND and NODEFER respectively.
  55. */
  56. #define SA_ONSTACK 0x00000001
  57. #define SA_RESETHAND 0x00000004
  58. #define SA_NOCLDSTOP 0x00000008
  59. #define SA_SIGINFO 0x00000010
  60. #define SA_NODEFER 0x00000020
  61. #define SA_RESTART 0x00000040
  62. #define SA_NOCLDWAIT 0x00000080
  63. #define _SA_SIGGFAULT 0x00000100 /* HPUX */
  64. #define SA_NOMASK SA_NODEFER
  65. #define SA_ONESHOT SA_RESETHAND
  66. #define SA_RESTORER 0x04000000 /* obsolete -- ignored */
  67. /*
  68. * sigaltstack controls
  69. */
  70. #define SS_ONSTACK 1
  71. #define SS_DISABLE 2
  72. #define MINSIGSTKSZ 2048
  73. #define SIGSTKSZ 8192
  74. #ifdef __KERNEL__
  75. #define _NSIG 64
  76. /* bits-per-word, where word apparently means 'long' not 'int' */
  77. #define _NSIG_BPW BITS_PER_LONG
  78. #define _NSIG_WORDS (_NSIG / _NSIG_BPW)
  79. #endif /* __KERNEL__ */
  80. #define SIG_BLOCK 0 /* for blocking signals */
  81. #define SIG_UNBLOCK 1 /* for unblocking signals */
  82. #define SIG_SETMASK 2 /* for setting the signal mask */
  83. #define SIG_DFL ((__sighandler_t)0) /* default signal handling */
  84. #define SIG_IGN ((__sighandler_t)1) /* ignore signal */
  85. #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
  86. # ifndef __ASSEMBLY__
  87. # include <linux/types.h>
  88. /* Avoid too many header ordering problems. */
  89. struct siginfo;
  90. /* Type of a signal handler. */
  91. #ifdef __LP64__
  92. /* function pointers on 64-bit parisc are pointers to little structs and the
  93. * compiler doesn't support code which changes or tests the address of
  94. * the function in the little struct. This is really ugly -PB
  95. */
  96. typedef char __user *__sighandler_t;
  97. #else
  98. typedef void __signalfn_t(int);
  99. typedef __signalfn_t __user *__sighandler_t;
  100. #endif
  101. typedef struct sigaltstack {
  102. void __user *ss_sp;
  103. int ss_flags;
  104. size_t ss_size;
  105. } stack_t;
  106. #ifdef __KERNEL__
  107. /* Most things should be clean enough to redefine this at will, if care
  108. is taken to make libc match. */
  109. typedef unsigned long old_sigset_t; /* at least 32 bits */
  110. typedef struct {
  111. /* next_signal() assumes this is a long - no choice */
  112. unsigned long sig[_NSIG_WORDS];
  113. } sigset_t;
  114. struct sigaction {
  115. __sighandler_t sa_handler;
  116. unsigned long sa_flags;
  117. sigset_t sa_mask; /* mask last for extensibility */
  118. };
  119. struct k_sigaction {
  120. struct sigaction sa;
  121. };
  122. #define ptrace_signal_deliver(regs, cookie) do { } while (0)
  123. #include <asm/sigcontext.h>
  124. #endif /* __KERNEL__ */
  125. #endif /* !__ASSEMBLY */
  126. #endif /* _ASM_PARISC_SIGNAL_H */