xref: /openbmc/linux/arch/alpha/include/uapi/asm/signal.h (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
296433f6eSDavid Howells #ifndef _UAPI_ASMAXP_SIGNAL_H
396433f6eSDavid Howells #define _UAPI_ASMAXP_SIGNAL_H
496433f6eSDavid Howells 
596433f6eSDavid Howells #include <linux/types.h>
696433f6eSDavid Howells 
796433f6eSDavid Howells /* Avoid too many header ordering problems.  */
896433f6eSDavid Howells struct siginfo;
996433f6eSDavid Howells 
1096433f6eSDavid Howells #ifndef __KERNEL__
1196433f6eSDavid Howells /* Here we must cater to libcs that poke about in kernel headers.  */
1296433f6eSDavid Howells 
1396433f6eSDavid Howells #define NSIG		32
1496433f6eSDavid Howells typedef unsigned long sigset_t;
1596433f6eSDavid Howells 
1696433f6eSDavid Howells #endif /* __KERNEL__ */
1796433f6eSDavid Howells 
1896433f6eSDavid Howells 
1996433f6eSDavid Howells /*
2096433f6eSDavid Howells  * Linux/AXP has different signal numbers that Linux/i386: I'm trying
2196433f6eSDavid Howells  * to make it OSF/1 binary compatible, at least for normal binaries.
2296433f6eSDavid Howells  */
2396433f6eSDavid Howells #define SIGHUP		 1
2496433f6eSDavid Howells #define SIGINT		 2
2596433f6eSDavid Howells #define SIGQUIT		 3
2696433f6eSDavid Howells #define SIGILL		 4
2796433f6eSDavid Howells #define SIGTRAP		 5
2896433f6eSDavid Howells #define SIGABRT		 6
2996433f6eSDavid Howells #define SIGEMT		 7
3096433f6eSDavid Howells #define SIGFPE		 8
3196433f6eSDavid Howells #define SIGKILL		 9
3296433f6eSDavid Howells #define SIGBUS		10
3396433f6eSDavid Howells #define SIGSEGV		11
3496433f6eSDavid Howells #define SIGSYS		12
3596433f6eSDavid Howells #define SIGPIPE		13
3696433f6eSDavid Howells #define SIGALRM		14
3796433f6eSDavid Howells #define SIGTERM		15
3896433f6eSDavid Howells #define SIGURG		16
3996433f6eSDavid Howells #define SIGSTOP		17
4096433f6eSDavid Howells #define SIGTSTP		18
4196433f6eSDavid Howells #define SIGCONT		19
4296433f6eSDavid Howells #define SIGCHLD		20
4396433f6eSDavid Howells #define SIGTTIN		21
4496433f6eSDavid Howells #define SIGTTOU		22
4596433f6eSDavid Howells #define SIGIO		23
4696433f6eSDavid Howells #define SIGXCPU		24
4796433f6eSDavid Howells #define SIGXFSZ		25
4896433f6eSDavid Howells #define SIGVTALRM	26
4996433f6eSDavid Howells #define SIGPROF		27
5096433f6eSDavid Howells #define SIGWINCH	28
5196433f6eSDavid Howells #define SIGINFO		29
5296433f6eSDavid Howells #define SIGUSR1		30
5396433f6eSDavid Howells #define SIGUSR2		31
5496433f6eSDavid Howells 
5596433f6eSDavid Howells #define SIGPOLL	SIGIO
5696433f6eSDavid Howells #define SIGPWR	SIGINFO
5796433f6eSDavid Howells #define SIGIOT	SIGABRT
5896433f6eSDavid Howells 
5996433f6eSDavid Howells /* These should not be considered constants from userland.  */
6096433f6eSDavid Howells #define SIGRTMIN	32
6196433f6eSDavid Howells #define SIGRTMAX	_NSIG
6296433f6eSDavid Howells 
6396433f6eSDavid Howells #define SA_ONSTACK	0x00000001
6496433f6eSDavid Howells #define SA_RESTART	0x00000002
6596433f6eSDavid Howells #define SA_NOCLDSTOP	0x00000004
6696433f6eSDavid Howells #define SA_NODEFER	0x00000008
6796433f6eSDavid Howells #define SA_RESETHAND	0x00000010
6896433f6eSDavid Howells #define SA_NOCLDWAIT	0x00000020
6996433f6eSDavid Howells #define SA_SIGINFO	0x00000040
7096433f6eSDavid Howells 
7196433f6eSDavid Howells #define SA_ONESHOT	SA_RESETHAND
7296433f6eSDavid Howells #define SA_NOMASK	SA_NODEFER
7396433f6eSDavid Howells 
7496433f6eSDavid Howells #define MINSIGSTKSZ	4096
7596433f6eSDavid Howells #define SIGSTKSZ	16384
7696433f6eSDavid Howells 
7796433f6eSDavid Howells #define SIG_BLOCK          1	/* for blocking signals */
7896433f6eSDavid Howells #define SIG_UNBLOCK        2	/* for unblocking signals */
7996433f6eSDavid Howells #define SIG_SETMASK        3	/* for setting the signal mask */
8096433f6eSDavid Howells 
8196433f6eSDavid Howells #include <asm-generic/signal-defs.h>
8296433f6eSDavid Howells 
8396433f6eSDavid Howells #ifndef __KERNEL__
8496433f6eSDavid Howells /* Here we must cater to libcs that poke about in kernel headers.  */
8596433f6eSDavid Howells 
8696433f6eSDavid Howells struct sigaction {
8796433f6eSDavid Howells 	union {
8896433f6eSDavid Howells 	  __sighandler_t	_sa_handler;
8996433f6eSDavid Howells 	  void (*_sa_sigaction)(int, struct siginfo *, void *);
9096433f6eSDavid Howells 	} _u;
9196433f6eSDavid Howells 	sigset_t	sa_mask;
9296433f6eSDavid Howells 	int		sa_flags;
9396433f6eSDavid Howells };
9496433f6eSDavid Howells 
9596433f6eSDavid Howells #define sa_handler	_u._sa_handler
9696433f6eSDavid Howells #define sa_sigaction	_u._sa_sigaction
9796433f6eSDavid Howells 
9896433f6eSDavid Howells #endif /* __KERNEL__ */
9996433f6eSDavid Howells 
10096433f6eSDavid Howells typedef struct sigaltstack {
10196433f6eSDavid Howells 	void __user *ss_sp;
10296433f6eSDavid Howells 	int ss_flags;
103*72113d0aSMasahiro Yamada 	__kernel_size_t ss_size;
10496433f6eSDavid Howells } stack_t;
10596433f6eSDavid Howells 
10696433f6eSDavid Howells /* sigstack(2) is deprecated, and will be withdrawn in a future version
10796433f6eSDavid Howells    of the X/Open CAE Specification.  Use sigaltstack instead.  It is only
10896433f6eSDavid Howells    implemented here for OSF/1 compatibility.  */
10996433f6eSDavid Howells 
11096433f6eSDavid Howells struct sigstack {
11196433f6eSDavid Howells 	void __user *ss_sp;
11296433f6eSDavid Howells 	int ss_onstack;
11396433f6eSDavid Howells };
11496433f6eSDavid Howells 
11596433f6eSDavid Howells 
11696433f6eSDavid Howells #endif /* _UAPI_ASMAXP_SIGNAL_H */
117