summaryrefslogtreecommitdiffstats
path: root/kernel/include/linux/signal.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/include/linux/signal.h')
-rw-r--r--kernel/include/linux/signal.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/include/linux/signal.h b/kernel/include/linux/signal.h
index 561a1283e..ddd1e6866 100644
--- a/kernel/include/linux/signal.h
+++ b/kernel/include/linux/signal.h
@@ -28,6 +28,21 @@ struct sigpending {
sigset_t signal;
};
+#ifndef HAVE_ARCH_COPY_SIGINFO
+
+#include <linux/string.h>
+
+static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
+{
+ if (from->si_code < 0)
+ memcpy(to, from, sizeof(*to));
+ else
+ /* _sigchld is currently the largest know union member */
+ memcpy(to, from, __ARCH_SI_PREAMBLE_SIZE + sizeof(from->_sifields._sigchld));
+}
+
+#endif
+
/*
* Define some primitives to manipulate sigset_t.
*/