siginfo.h 917 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef _ASM_GENERIC_SIGINFO_H
  2. #define _ASM_GENERIC_SIGINFO_H
  3. #include <uapi/asm-generic/siginfo.h>
  4. #define __SI_MASK 0xffff0000u
  5. #define __SI_KILL (0 << 16)
  6. #define __SI_TIMER (1 << 16)
  7. #define __SI_POLL (2 << 16)
  8. #define __SI_FAULT (3 << 16)
  9. #define __SI_CHLD (4 << 16)
  10. #define __SI_RT (5 << 16)
  11. #define __SI_MESGQ (6 << 16)
  12. #define __SI_SYS (7 << 16)
  13. #define __SI_CODE(T,N) ((T) | ((N) & 0xffff))
  14. struct siginfo;
  15. void do_schedule_next_timer(struct siginfo *info);
  16. #ifndef HAVE_ARCH_COPY_SIGINFO
  17. #include <linux/string.h>
  18. static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
  19. {
  20. if (from->si_code < 0)
  21. memcpy(to, from, sizeof(*to));
  22. else
  23. /* _sigchld is currently the largest know union member */
  24. memcpy(to, from, __ARCH_SI_PREAMBLE_SIZE + sizeof(from->_sifields._sigchld));
  25. }
  26. #endif
  27. extern int copy_siginfo_to_user(struct siginfo __user *to, const struct siginfo *from);
  28. #endif