kernel_sigaction.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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(__mips__)
  7. #undef HAVE_SA_RESTORER
  8. /* This is the sigaction structure from the Linux 2.1.24 kernel. */
  9. #include <sgidefs.h>
  10. struct old_kernel_sigaction {
  11. __sighandler_t k_sa_handler;
  12. unsigned int sa_flags;
  13. unsigned long sa_mask;
  14. };
  15. #define _KERNEL_NSIG 128
  16. #define _KERNEL_NSIG_BPW 32
  17. #define _KERNEL_NSIG_WORDS (_KERNEL_NSIG / _KERNEL_NSIG_BPW)
  18. typedef struct {
  19. unsigned long sig[_KERNEL_NSIG_WORDS];
  20. } kernel_sigset_t;
  21. /* This is the sigaction structure from the Linux 2.1.68 kernel. */
  22. struct kernel_sigaction {
  23. unsigned int sa_flags;
  24. __sighandler_t k_sa_handler;
  25. kernel_sigset_t sa_mask;
  26. void (*sa_restorer)(void);
  27. int s_resv[1]; /* reserved */
  28. };
  29. #elif defined(__ia64__)
  30. #define NO_OLD_SIGACTION
  31. #undef HAVE_SA_RESTORER
  32. struct kernel_sigaction {
  33. __sighandler_t k_sa_handler;
  34. unsigned long sa_flags;
  35. sigset_t sa_mask;
  36. };
  37. #else
  38. #define HAVE_SA_RESTORER
  39. /* This is the sigaction structure from the Linux 2.1.20 kernel. */
  40. struct old_kernel_sigaction {
  41. __sighandler_t k_sa_handler;
  42. unsigned long sa_mask;
  43. unsigned long sa_flags;
  44. void (*sa_restorer) (void);
  45. };
  46. /* This is the sigaction structure from the Linux 2.1.68 kernel. */
  47. struct kernel_sigaction {
  48. __sighandler_t k_sa_handler;
  49. unsigned long sa_flags;
  50. void (*sa_restorer) (void);
  51. sigset_t sa_mask;
  52. };
  53. #endif
  54. #ifndef NO_OLD_SIGACTION
  55. extern int __syscall_sigaction (int, const struct old_kernel_sigaction *__unbounded,
  56. struct old_kernel_sigaction *__unbounded);
  57. #endif
  58. extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded,
  59. struct kernel_sigaction *__unbounded, size_t);
  60. #endif /* _BITS_STAT_STRUCT_H */