Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
David Howells | 61730c5 | 2012-10-09 09:47:14 +0100 | [diff] [blame] | 12 | #include <uapi/asm/siginfo.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | |
| 15 | /* |
| 16 | * Duplicated here because of <asm-generic/siginfo.h> braindamage ... |
| 17 | */ |
| 18 | #include <linux/string.h> |
| 19 | |
| 20 | static inline void copy_siginfo(struct siginfo *to, struct siginfo *from) |
| 21 | { |
| 22 | if (from->si_code < 0) |
| 23 | memcpy(to, from, sizeof(*to)); |
| 24 | else |
| 25 | /* _sigchld is currently the largest know union member */ |
| 26 | memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld)); |
| 27 | } |
| 28 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | #endif /* _ASM_SIGINFO_H */ |