kernel_sigaction.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. #ifndef _BITS_STAT_STRUCT_H
  2. #define _BITS_STAT_STRUCT_H
  3. /* This file provides whatever this particular arch's kernel thinks
  4. * the sigaction struct should look like... */
  5. #undef NO_OLD_SIGACTION
  6. #if defined(__alpha__)
  7. #undef HAVE_SA_RESTORER
  8. /* This is the sigaction struction from the Linux 2.1.20 kernel. */
  9. struct old_kernel_sigaction {
  10. __sighandler_t k_sa_handler;
  11. unsigned long sa_mask;
  12. unsigned int sa_flags;
  13. };
  14. /* This is the sigaction structure from the Linux 2.1.68 kernel. */
  15. struct kernel_sigaction {
  16. __sighandler_t k_sa_handler;
  17. unsigned int sa_flags;
  18. sigset_t sa_mask;
  19. };
  20. #elif defined(__hppa__)
  21. #undef HAVE_SA_RESTORER
  22. /* This is the sigaction struction from the Linux 2.1.20 kernel. */
  23. /* Blah. This is bogus. We don't ever use it. */
  24. struct old_kernel_sigaction {
  25. __sighandler_t k_sa_handler;
  26. unsigned long sa_mask;
  27. unsigned long sa_flags;
  28. };
  29. /* This is the sigaction structure from the Linux 2.1.68 kernel. */
  30. struct kernel_sigaction {
  31. __sighandler_t k_sa_handler;
  32. unsigned long sa_flags;
  33. sigset_t sa_mask;
  34. };
  35. #elif defined(__mips__)
  36. #undef HAVE_SA_RESTORER
  37. /* This is the sigaction structure from the Linux 2.1.24 kernel. */
  38. #include <sgidefs.h>
  39. struct old_kernel_sigaction {
  40. __sighandler_t k_sa_handler;
  41. unsigned int sa_flags;
  42. unsigned long sa_mask;
  43. };
  44. #define _KERNEL_NSIG 128
  45. #define _KERNEL_NSIG_BPW 32
  46. #define _KERNEL_NSIG_WORDS (_KERNEL_NSIG / _KERNEL_NSIG_BPW)
  47. typedef struct {
  48. unsigned long sig[_KERNEL_NSIG_WORDS];
  49. } kernel_sigset_t;
  50. /* This is the sigaction structure from the Linux 2.1.68 kernel. */
  51. struct kernel_sigaction {
  52. unsigned int sa_flags;
  53. __sighandler_t k_sa_handler;
  54. kernel_sigset_t sa_mask;
  55. void (*sa_restorer)(void);
  56. int s_resv[1]; /* reserved */
  57. };
  58. #elif defined(__ia64__)
  59. #define NO_OLD_SIGACTION
  60. #undef HAVE_SA_RESTORER
  61. struct kernel_sigaction {
  62. __sighandler_t k_sa_handler;
  63. unsigned long sa_flags;
  64. sigset_t sa_mask;
  65. };
  66. #else
  67. #define HAVE_SA_RESTORER
  68. /* This is the sigaction structure from the Linux 2.1.20 kernel. */
  69. struct old_kernel_sigaction {
  70. __sighandler_t k_sa_handler;
  71. unsigned long sa_mask;
  72. unsigned long sa_flags;
  73. void (*sa_restorer) (void);
  74. };
  75. /* This is the sigaction structure from the Linux 2.1.68 kernel. */
  76. struct kernel_sigaction {
  77. __sighandler_t k_sa_handler;
  78. unsigned long sa_flags;
  79. void (*sa_restorer) (void);
  80. sigset_t sa_mask;
  81. };
  82. #endif
  83. #ifndef NO_OLD_SIGACTION
  84. extern int __syscall_sigaction (int, const struct old_kernel_sigaction *__unbounded,
  85. struct old_kernel_sigaction *__unbounded);
  86. #endif
  87. extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded,
  88. struct kernel_sigaction *__unbounded, size_t);
  89. #endif /* _BITS_STAT_STRUCT_H */