about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/s390/kernel_sigaction.h')
-rw-r--r--sysdeps/unix/sysv/linux/s390/kernel_sigaction.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h b/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h
new file mode 100644
index 0000000000..a8beaf7347
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h
@@ -0,0 +1,28 @@
+#include <bits/types/siginfo_t.h>
+
+#define SA_RESTORER	0x04000000
+
+/* This is the sigaction structure from the Linux 3.2 kernel.  */
+struct kernel_sigaction
+{
+  union
+  {
+    __sighandler_t _sa_handler;
+    void (*_sa_sigaction)(int, siginfo_t *, void *);
+  } _u;
+#define k_sa_handler _u._sa_handler
+#ifndef __s390x__
+  sigset_t sa_mask;
+  unsigned long sa_flags;
+  void (*sa_restorer)(void);
+#else
+  unsigned long sa_flags;
+  void (*sa_restorer)(void);
+  sigset_t sa_mask;
+#endif
+};
+
+#define SET_SA_RESTORER(kact, act)             \
+  (kact)->sa_restorer = (act)->sa_restorer
+#define RESET_SA_RESTORER(act, kact)           \
+  (act)->sa_restorer = (kact)->sa_restorer