siginfo.h 770 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 1998, 1999, 2001, 2003 Ralf Baechle
  7. * Copyright (C) 2000, 2001 Silicon Graphics, Inc.
  8. */
  9. #ifndef _ASM_SIGINFO_H
  10. #define _ASM_SIGINFO_H
  11. #include <uapi/asm/siginfo.h>
  12. /*
  13. * Duplicated here because of <asm-generic/siginfo.h> braindamage ...
  14. */
  15. #include <linux/string.h>
  16. static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
  17. {
  18. if (from->si_code < 0)
  19. memcpy(to, from, sizeof(*to));
  20. else
  21. /* _sigchld is currently the largest know union member */
  22. memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
  23. }
  24. #endif /* _ASM_SIGINFO_H */