162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
262306a36Sopenharmony_ci#ifndef _UAPI_ASMAXP_SIGNAL_H
362306a36Sopenharmony_ci#define _UAPI_ASMAXP_SIGNAL_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci#include <linux/types.h>
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci/* Avoid too many header ordering problems.  */
862306a36Sopenharmony_cistruct siginfo;
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#ifndef __KERNEL__
1162306a36Sopenharmony_ci/* Here we must cater to libcs that poke about in kernel headers.  */
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#define NSIG		32
1462306a36Sopenharmony_citypedef unsigned long sigset_t;
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci#endif /* __KERNEL__ */
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci/*
2062306a36Sopenharmony_ci * Linux/AXP has different signal numbers that Linux/i386: I'm trying
2162306a36Sopenharmony_ci * to make it OSF/1 binary compatible, at least for normal binaries.
2262306a36Sopenharmony_ci */
2362306a36Sopenharmony_ci#define SIGHUP		 1
2462306a36Sopenharmony_ci#define SIGINT		 2
2562306a36Sopenharmony_ci#define SIGQUIT		 3
2662306a36Sopenharmony_ci#define SIGILL		 4
2762306a36Sopenharmony_ci#define SIGTRAP		 5
2862306a36Sopenharmony_ci#define SIGABRT		 6
2962306a36Sopenharmony_ci#define SIGEMT		 7
3062306a36Sopenharmony_ci#define SIGFPE		 8
3162306a36Sopenharmony_ci#define SIGKILL		 9
3262306a36Sopenharmony_ci#define SIGBUS		10
3362306a36Sopenharmony_ci#define SIGSEGV		11
3462306a36Sopenharmony_ci#define SIGSYS		12
3562306a36Sopenharmony_ci#define SIGPIPE		13
3662306a36Sopenharmony_ci#define SIGALRM		14
3762306a36Sopenharmony_ci#define SIGTERM		15
3862306a36Sopenharmony_ci#define SIGURG		16
3962306a36Sopenharmony_ci#define SIGSTOP		17
4062306a36Sopenharmony_ci#define SIGTSTP		18
4162306a36Sopenharmony_ci#define SIGCONT		19
4262306a36Sopenharmony_ci#define SIGCHLD		20
4362306a36Sopenharmony_ci#define SIGTTIN		21
4462306a36Sopenharmony_ci#define SIGTTOU		22
4562306a36Sopenharmony_ci#define SIGIO		23
4662306a36Sopenharmony_ci#define SIGXCPU		24
4762306a36Sopenharmony_ci#define SIGXFSZ		25
4862306a36Sopenharmony_ci#define SIGVTALRM	26
4962306a36Sopenharmony_ci#define SIGPROF		27
5062306a36Sopenharmony_ci#define SIGWINCH	28
5162306a36Sopenharmony_ci#define SIGINFO		29
5262306a36Sopenharmony_ci#define SIGUSR1		30
5362306a36Sopenharmony_ci#define SIGUSR2		31
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci#define SIGPOLL	SIGIO
5662306a36Sopenharmony_ci#define SIGPWR	SIGINFO
5762306a36Sopenharmony_ci#define SIGIOT	SIGABRT
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ci/* These should not be considered constants from userland.  */
6062306a36Sopenharmony_ci#define SIGRTMIN	32
6162306a36Sopenharmony_ci#define SIGRTMAX	_NSIG
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ci#define SA_ONSTACK	0x00000001
6462306a36Sopenharmony_ci#define SA_RESTART	0x00000002
6562306a36Sopenharmony_ci#define SA_NOCLDSTOP	0x00000004
6662306a36Sopenharmony_ci#define SA_NODEFER	0x00000008
6762306a36Sopenharmony_ci#define SA_RESETHAND	0x00000010
6862306a36Sopenharmony_ci#define SA_NOCLDWAIT	0x00000020
6962306a36Sopenharmony_ci#define SA_SIGINFO	0x00000040
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_ci#define SA_ONESHOT	SA_RESETHAND
7262306a36Sopenharmony_ci#define SA_NOMASK	SA_NODEFER
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ci#define MINSIGSTKSZ	4096
7562306a36Sopenharmony_ci#define SIGSTKSZ	16384
7662306a36Sopenharmony_ci
7762306a36Sopenharmony_ci#define SIG_BLOCK          1	/* for blocking signals */
7862306a36Sopenharmony_ci#define SIG_UNBLOCK        2	/* for unblocking signals */
7962306a36Sopenharmony_ci#define SIG_SETMASK        3	/* for setting the signal mask */
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ci#include <asm-generic/signal-defs.h>
8262306a36Sopenharmony_ci
8362306a36Sopenharmony_ci#ifndef __KERNEL__
8462306a36Sopenharmony_ci/* Here we must cater to libcs that poke about in kernel headers.  */
8562306a36Sopenharmony_ci
8662306a36Sopenharmony_cistruct sigaction {
8762306a36Sopenharmony_ci	union {
8862306a36Sopenharmony_ci	  __sighandler_t	_sa_handler;
8962306a36Sopenharmony_ci	  void (*_sa_sigaction)(int, struct siginfo *, void *);
9062306a36Sopenharmony_ci	} _u;
9162306a36Sopenharmony_ci	sigset_t	sa_mask;
9262306a36Sopenharmony_ci	int		sa_flags;
9362306a36Sopenharmony_ci};
9462306a36Sopenharmony_ci
9562306a36Sopenharmony_ci#define sa_handler	_u._sa_handler
9662306a36Sopenharmony_ci#define sa_sigaction	_u._sa_sigaction
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ci#endif /* __KERNEL__ */
9962306a36Sopenharmony_ci
10062306a36Sopenharmony_citypedef struct sigaltstack {
10162306a36Sopenharmony_ci	void __user *ss_sp;
10262306a36Sopenharmony_ci	int ss_flags;
10362306a36Sopenharmony_ci	__kernel_size_t ss_size;
10462306a36Sopenharmony_ci} stack_t;
10562306a36Sopenharmony_ci
10662306a36Sopenharmony_ci/* sigstack(2) is deprecated, and will be withdrawn in a future version
10762306a36Sopenharmony_ci   of the X/Open CAE Specification.  Use sigaltstack instead.  It is only
10862306a36Sopenharmony_ci   implemented here for OSF/1 compatibility.  */
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_cistruct sigstack {
11162306a36Sopenharmony_ci	void __user *ss_sp;
11262306a36Sopenharmony_ci	int ss_onstack;
11362306a36Sopenharmony_ci};
11462306a36Sopenharmony_ci
11562306a36Sopenharmony_ci
11662306a36Sopenharmony_ci#endif /* _UAPI_ASMAXP_SIGNAL_H */
117