xref: /openbmc/linux/arch/alpha/include/uapi/asm/signal.h (revision 65844828)
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef _UAPI_ASMAXP_SIGNAL_H
3 #define _UAPI_ASMAXP_SIGNAL_H
4 
5 #include <linux/types.h>
6 
7 /* Avoid too many header ordering problems.  */
8 struct siginfo;
9 
10 #ifndef __KERNEL__
11 /* Here we must cater to libcs that poke about in kernel headers.  */
12 
13 #define NSIG		32
14 typedef unsigned long sigset_t;
15 
16 #endif /* __KERNEL__ */
17 
18 
19 /*
20  * Linux/AXP has different signal numbers that Linux/i386: I'm trying
21  * to make it OSF/1 binary compatible, at least for normal binaries.
22  */
23 #define SIGHUP		 1
24 #define SIGINT		 2
25 #define SIGQUIT		 3
26 #define SIGILL		 4
27 #define SIGTRAP		 5
28 #define SIGABRT		 6
29 #define SIGEMT		 7
30 #define SIGFPE		 8
31 #define SIGKILL		 9
32 #define SIGBUS		10
33 #define SIGSEGV		11
34 #define SIGSYS		12
35 #define SIGPIPE		13
36 #define SIGALRM		14
37 #define SIGTERM		15
38 #define SIGURG		16
39 #define SIGSTOP		17
40 #define SIGTSTP		18
41 #define SIGCONT		19
42 #define SIGCHLD		20
43 #define SIGTTIN		21
44 #define SIGTTOU		22
45 #define SIGIO		23
46 #define SIGXCPU		24
47 #define SIGXFSZ		25
48 #define SIGVTALRM	26
49 #define SIGPROF		27
50 #define SIGWINCH	28
51 #define SIGINFO		29
52 #define SIGUSR1		30
53 #define SIGUSR2		31
54 
55 #define SIGPOLL	SIGIO
56 #define SIGPWR	SIGINFO
57 #define SIGIOT	SIGABRT
58 
59 /* These should not be considered constants from userland.  */
60 #define SIGRTMIN	32
61 #define SIGRTMAX	_NSIG
62 
63 #define SA_ONSTACK	0x00000001
64 #define SA_RESTART	0x00000002
65 #define SA_NOCLDSTOP	0x00000004
66 #define SA_NODEFER	0x00000008
67 #define SA_RESETHAND	0x00000010
68 #define SA_NOCLDWAIT	0x00000020
69 #define SA_SIGINFO	0x00000040
70 
71 #define SA_ONESHOT	SA_RESETHAND
72 #define SA_NOMASK	SA_NODEFER
73 
74 #define MINSIGSTKSZ	4096
75 #define SIGSTKSZ	16384
76 
77 #define SIG_BLOCK          1	/* for blocking signals */
78 #define SIG_UNBLOCK        2	/* for unblocking signals */
79 #define SIG_SETMASK        3	/* for setting the signal mask */
80 
81 #include <asm-generic/signal-defs.h>
82 
83 #ifndef __KERNEL__
84 /* Here we must cater to libcs that poke about in kernel headers.  */
85 
86 struct sigaction {
87 	union {
88 	  __sighandler_t	_sa_handler;
89 	  void (*_sa_sigaction)(int, struct siginfo *, void *);
90 	} _u;
91 	sigset_t	sa_mask;
92 	int		sa_flags;
93 };
94 
95 #define sa_handler	_u._sa_handler
96 #define sa_sigaction	_u._sa_sigaction
97 
98 #endif /* __KERNEL__ */
99 
100 typedef struct sigaltstack {
101 	void __user *ss_sp;
102 	int ss_flags;
103 	__kernel_size_t ss_size;
104 } stack_t;
105 
106 /* sigstack(2) is deprecated, and will be withdrawn in a future version
107    of the X/Open CAE Specification.  Use sigaltstack instead.  It is only
108    implemented here for OSF/1 compatibility.  */
109 
110 struct sigstack {
111 	void __user *ss_sp;
112 	int ss_onstack;
113 };
114 
115 
116 #endif /* _UAPI_ASMAXP_SIGNAL_H */
117