kernel_sigaction.h 2.5 KB

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