diff options
| -rw-r--r-- | arch/s390/include/uapi/asm/signal.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/arch/s390/include/uapi/asm/signal.h b/arch/s390/include/uapi/asm/signal.h index c57f9d28d894..9a14a611ed82 100644 --- a/arch/s390/include/uapi/asm/signal.h +++ b/arch/s390/include/uapi/asm/signal.h | |||
| @@ -97,22 +97,31 @@ typedef unsigned long sigset_t; | |||
| 97 | #include <asm-generic/signal-defs.h> | 97 | #include <asm-generic/signal-defs.h> |
| 98 | 98 | ||
| 99 | #ifndef __KERNEL__ | 99 | #ifndef __KERNEL__ |
| 100 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
| 101 | 100 | ||
| 101 | /* | ||
| 102 | * There are two system calls in regard to sigaction, sys_rt_sigaction | ||
| 103 | * and sys_sigaction. Internally the kernel uses the struct old_sigaction | ||
| 104 | * for the older sys_sigaction system call, and the kernel version of the | ||
| 105 | * struct sigaction for the newer sys_rt_sigaction. | ||
| 106 | * | ||
| 107 | * The uapi definition for struct sigaction has made a strange distinction | ||
| 108 | * between 31-bit and 64-bit in the past. For 64-bit the uapi structure | ||
| 109 | * looks like the kernel struct sigaction, but for 31-bit it used to | ||
| 110 | * look like the kernel struct old_sigaction. That practically made the | ||
| 111 | * structure unusable for either system call. To get around this problem | ||
| 112 | * the glibc always had its own definitions for the sigaction structures. | ||
| 113 | * | ||
| 114 | * The current struct sigaction uapi definition below is suitable for the | ||
| 115 | * sys_rt_sigaction system call only. | ||
| 116 | */ | ||
| 102 | struct sigaction { | 117 | struct sigaction { |
| 103 | union { | 118 | union { |
| 104 | __sighandler_t _sa_handler; | 119 | __sighandler_t _sa_handler; |
| 105 | void (*_sa_sigaction)(int, struct siginfo *, void *); | 120 | void (*_sa_sigaction)(int, struct siginfo *, void *); |
| 106 | } _u; | 121 | } _u; |
| 107 | #ifndef __s390x__ /* lovely */ | ||
| 108 | sigset_t sa_mask; | ||
| 109 | unsigned long sa_flags; | ||
| 110 | void (*sa_restorer)(void); | ||
| 111 | #else /* __s390x__ */ | ||
| 112 | unsigned long sa_flags; | 122 | unsigned long sa_flags; |
| 113 | void (*sa_restorer)(void); | 123 | void (*sa_restorer)(void); |
| 114 | sigset_t sa_mask; | 124 | sigset_t sa_mask; |
| 115 | #endif /* __s390x__ */ | ||
| 116 | }; | 125 | }; |
| 117 | 126 | ||
| 118 | #define sa_handler _u._sa_handler | 127 | #define sa_handler _u._sa_handler |
