signal.h 891 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef _ASM_SIGNAL_H
  2. #define _ASM_SIGNAL_H
  3. #include <linux/types.h>
  4. #ifndef __KERNEL__
  5. /* Here we must cater to libcs that poke about in kernel headers. */
  6. #define NSIG 32
  7. typedef unsigned long sigset_t;
  8. #endif /* !__KERNEL__ */
  9. #define SA_RESTORER 0x04000000 /* to get struct sigaction correct */
  10. #include <asm-generic/signal.h>
  11. #ifdef __KERNEL__
  12. struct old_sigaction {
  13. __sighandler_t sa_handler;
  14. old_sigset_t sa_mask;
  15. unsigned long sa_flags;
  16. __sigrestore_t sa_restorer;
  17. };
  18. #else
  19. /* Here we must cater to libcs that poke about in kernel headers. */
  20. struct sigaction {
  21. union {
  22. __sighandler_t _sa_handler;
  23. void (*_sa_sigaction)(int, struct siginfo *, void *);
  24. } _u;
  25. sigset_t sa_mask;
  26. unsigned long sa_flags;
  27. void (*sa_restorer)(void);
  28. };
  29. #define sa_handler _u._sa_handler
  30. #define sa_sigaction _u._sa_sigaction
  31. #endif /* __KERNEL__ */
  32. #endif /* _ASM_SIGNAL_H */