Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 /*
0003  *  S390 version
0004  *
0005  *  Derived from "include/asm-i386/signal.h"
0006  */
0007 
0008 #ifndef _UAPI_ASMS390_SIGNAL_H
0009 #define _UAPI_ASMS390_SIGNAL_H
0010 
0011 #include <linux/types.h>
0012 #include <linux/time.h>
0013 
0014 /* Avoid too many header ordering problems.  */
0015 struct siginfo;
0016 struct pt_regs;
0017 
0018 #ifndef __KERNEL__
0019 /* Here we must cater to libcs that poke about in kernel headers.  */
0020 
0021 #define NSIG            32
0022 typedef unsigned long sigset_t;
0023 
0024 #endif /* __KERNEL__ */
0025 
0026 #define SIGHUP           1
0027 #define SIGINT           2
0028 #define SIGQUIT          3
0029 #define SIGILL           4
0030 #define SIGTRAP          5
0031 #define SIGABRT          6
0032 #define SIGIOT           6
0033 #define SIGBUS           7
0034 #define SIGFPE           8
0035 #define SIGKILL          9
0036 #define SIGUSR1         10
0037 #define SIGSEGV         11
0038 #define SIGUSR2         12
0039 #define SIGPIPE         13
0040 #define SIGALRM         14
0041 #define SIGTERM         15
0042 #define SIGSTKFLT       16
0043 #define SIGCHLD         17
0044 #define SIGCONT         18
0045 #define SIGSTOP         19
0046 #define SIGTSTP         20
0047 #define SIGTTIN         21
0048 #define SIGTTOU         22
0049 #define SIGURG          23
0050 #define SIGXCPU         24
0051 #define SIGXFSZ         25
0052 #define SIGVTALRM       26
0053 #define SIGPROF         27
0054 #define SIGWINCH        28
0055 #define SIGIO           29
0056 #define SIGPOLL         SIGIO
0057 /*
0058 #define SIGLOST         29
0059 */
0060 #define SIGPWR          30
0061 #define SIGSYS      31
0062 #define SIGUNUSED       31
0063 
0064 /* These should not be considered constants from userland.  */
0065 #define SIGRTMIN        32
0066 #define SIGRTMAX        _NSIG
0067 
0068 #define SA_RESTORER     0x04000000
0069 
0070 #define MINSIGSTKSZ     2048
0071 #define SIGSTKSZ        8192
0072 
0073 #include <asm-generic/signal-defs.h>
0074 
0075 #ifndef __KERNEL__
0076 
0077 /*
0078  * There are two system calls in regard to sigaction, sys_rt_sigaction
0079  * and sys_sigaction. Internally the kernel uses the struct old_sigaction
0080  * for the older sys_sigaction system call, and the kernel version of the
0081  * struct sigaction for the newer sys_rt_sigaction.
0082  *
0083  * The uapi definition for struct sigaction has made a strange distinction
0084  * between 31-bit and 64-bit in the past. For 64-bit the uapi structure
0085  * looks like the kernel struct sigaction, but for 31-bit it used to
0086  * look like the kernel struct old_sigaction. That practically made the
0087  * structure unusable for either system call. To get around this problem
0088  * the glibc always had its own definitions for the sigaction structures.
0089  *
0090  * The current struct sigaction uapi definition below is suitable for the
0091  * sys_rt_sigaction system call only.
0092  */
0093 struct sigaction {
0094         union {
0095           __sighandler_t _sa_handler;
0096           void (*_sa_sigaction)(int, struct siginfo *, void *);
0097         } _u;
0098         unsigned long sa_flags;
0099         void (*sa_restorer)(void);
0100     sigset_t sa_mask;
0101 };
0102 
0103 #define sa_handler      _u._sa_handler
0104 #define sa_sigaction    _u._sa_sigaction
0105 
0106 #endif /* __KERNEL__ */
0107 
0108 typedef struct sigaltstack {
0109         void __user *ss_sp;
0110         int ss_flags;
0111     __kernel_size_t ss_size;
0112 } stack_t;
0113 
0114 
0115 #endif /* _UAPI_ASMS390_SIGNAL_H */