master
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * S390 version
4 *
5 * Derived from "include/asm-i386/signal.h"
6 */
7
8#ifndef _ASMS390_SIGNAL_H
9#define _ASMS390_SIGNAL_H
10
11#include <linux/types.h>
12#include <linux/time.h>
13
14/* Avoid too many header ordering problems. */
15struct siginfo;
16struct pt_regs;
17
18/* Here we must cater to libcs that poke about in kernel headers. */
19
20#define NSIG 32
21typedef unsigned long sigset_t;
22
23
24#define SIGHUP 1
25#define SIGINT 2
26#define SIGQUIT 3
27#define SIGILL 4
28#define SIGTRAP 5
29#define SIGABRT 6
30#define SIGIOT 6
31#define SIGBUS 7
32#define SIGFPE 8
33#define SIGKILL 9
34#define SIGUSR1 10
35#define SIGSEGV 11
36#define SIGUSR2 12
37#define SIGPIPE 13
38#define SIGALRM 14
39#define SIGTERM 15
40#define SIGSTKFLT 16
41#define SIGCHLD 17
42#define SIGCONT 18
43#define SIGSTOP 19
44#define SIGTSTP 20
45#define SIGTTIN 21
46#define SIGTTOU 22
47#define SIGURG 23
48#define SIGXCPU 24
49#define SIGXFSZ 25
50#define SIGVTALRM 26
51#define SIGPROF 27
52#define SIGWINCH 28
53#define SIGIO 29
54#define SIGPOLL SIGIO
55/*
56#define SIGLOST 29
57*/
58#define SIGPWR 30
59#define SIGSYS 31
60#define SIGUNUSED 31
61
62/* These should not be considered constants from userland. */
63#define SIGRTMIN 32
64#define SIGRTMAX _NSIG
65
66#define SA_RESTORER 0x04000000
67
68#define MINSIGSTKSZ 2048
69#define SIGSTKSZ 8192
70
71#include <asm-generic/signal-defs.h>
72
73
74/*
75 * There are two system calls in regard to sigaction, sys_rt_sigaction
76 * and sys_sigaction. Internally the kernel uses the struct old_sigaction
77 * for the older sys_sigaction system call, and the kernel version of the
78 * struct sigaction for the newer sys_rt_sigaction.
79 *
80 * The uapi definition for struct sigaction has made a strange distinction
81 * between 31-bit and 64-bit in the past. For 64-bit the uapi structure
82 * looks like the kernel struct sigaction, but for 31-bit it used to
83 * look like the kernel struct old_sigaction. That practically made the
84 * structure unusable for either system call. To get around this problem
85 * the glibc always had its own definitions for the sigaction structures.
86 *
87 * The current struct sigaction uapi definition below is suitable for the
88 * sys_rt_sigaction system call only.
89 */
90struct sigaction {
91 union {
92 __sighandler_t _sa_handler;
93 void (*_sa_sigaction)(int, struct siginfo *, void *);
94 } _u;
95 unsigned long sa_flags;
96 void (*sa_restorer)(void);
97 sigset_t sa_mask;
98};
99
100#define sa_handler _u._sa_handler
101#define sa_sigaction _u._sa_sigaction
102
103
104typedef struct sigaltstack {
105 void *ss_sp;
106 int ss_flags;
107 __kernel_size_t ss_size;
108} stack_t;
109
110
111#endif /* _ASMS390_SIGNAL_H */