xref: /openbmc/linux/arch/parisc/include/uapi/asm/signal.h (revision d8f5457ab93965f0e695516ad23548954e3e9044)
170c1674fSDavid Howells #ifndef _UAPI_ASM_PARISC_SIGNAL_H
270c1674fSDavid Howells #define _UAPI_ASM_PARISC_SIGNAL_H
370c1674fSDavid Howells 
470c1674fSDavid Howells #define SIGHUP		 1
570c1674fSDavid Howells #define SIGINT		 2
670c1674fSDavid Howells #define SIGQUIT		 3
770c1674fSDavid Howells #define SIGILL		 4
870c1674fSDavid Howells #define SIGTRAP		 5
970c1674fSDavid Howells #define SIGABRT		 6
1070c1674fSDavid Howells #define SIGIOT		 6
111f25df2eSHelge Deller #define SIGSTKFLT	 7
1270c1674fSDavid Howells #define SIGFPE		 8
1370c1674fSDavid Howells #define SIGKILL		 9
1470c1674fSDavid Howells #define SIGBUS		10
1570c1674fSDavid Howells #define SIGSEGV		11
161f25df2eSHelge Deller #define SIGXCPU		12
1770c1674fSDavid Howells #define SIGPIPE		13
1870c1674fSDavid Howells #define SIGALRM		14
1970c1674fSDavid Howells #define SIGTERM		15
2070c1674fSDavid Howells #define SIGUSR1		16
2170c1674fSDavid Howells #define SIGUSR2		17
2270c1674fSDavid Howells #define SIGCHLD		18
2370c1674fSDavid Howells #define SIGPWR		19
2470c1674fSDavid Howells #define SIGVTALRM	20
2570c1674fSDavid Howells #define SIGPROF		21
2670c1674fSDavid Howells #define SIGIO		22
2770c1674fSDavid Howells #define SIGPOLL		SIGIO
2870c1674fSDavid Howells #define SIGWINCH	23
2970c1674fSDavid Howells #define SIGSTOP		24
3070c1674fSDavid Howells #define SIGTSTP		25
3170c1674fSDavid Howells #define SIGCONT		26
3270c1674fSDavid Howells #define SIGTTIN		27
3370c1674fSDavid Howells #define SIGTTOU		28
3470c1674fSDavid Howells #define SIGURG		29
351f25df2eSHelge Deller #define SIGXFSZ		30
3670c1674fSDavid Howells #define SIGUNUSED	31
371f25df2eSHelge Deller #define SIGSYS		31 /* Linux doesn't use this */
3870c1674fSDavid Howells 
3970c1674fSDavid Howells /* These should not be considered constants from userland.  */
401f25df2eSHelge Deller #define SIGRTMIN	32
4170c1674fSDavid Howells #define SIGRTMAX	_NSIG /* it's 44 under HP/UX */
4270c1674fSDavid Howells 
4370c1674fSDavid Howells /*
4470c1674fSDavid Howells  * SA_FLAGS values:
4570c1674fSDavid Howells  *
4670c1674fSDavid Howells  * SA_ONSTACK indicates that a registered stack_t will be used.
4770c1674fSDavid Howells  * SA_RESTART flag to get restarting signals (which were the default long ago)
4870c1674fSDavid Howells  * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
4970c1674fSDavid Howells  * SA_RESETHAND clears the handler when the signal is delivered.
5070c1674fSDavid Howells  * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
5170c1674fSDavid Howells  * SA_NODEFER prevents the current signal from being masked in the handler.
5270c1674fSDavid Howells  *
5370c1674fSDavid Howells  * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
5470c1674fSDavid Howells  * Unix names RESETHAND and NODEFER respectively.
5570c1674fSDavid Howells  */
5670c1674fSDavid Howells #define SA_ONSTACK	0x00000001
5770c1674fSDavid Howells #define SA_RESETHAND	0x00000004
5870c1674fSDavid Howells #define SA_NOCLDSTOP	0x00000008
5970c1674fSDavid Howells #define SA_SIGINFO	0x00000010
6070c1674fSDavid Howells #define SA_NODEFER	0x00000020
6170c1674fSDavid Howells #define SA_RESTART	0x00000040
6270c1674fSDavid Howells #define SA_NOCLDWAIT	0x00000080
6370c1674fSDavid Howells #define _SA_SIGGFAULT	0x00000100 /* HPUX */
6470c1674fSDavid Howells 
6570c1674fSDavid Howells #define SA_NOMASK	SA_NODEFER
6670c1674fSDavid Howells #define SA_ONESHOT	SA_RESETHAND
6770c1674fSDavid Howells 
6870c1674fSDavid Howells #define MINSIGSTKSZ	2048
6970c1674fSDavid Howells #define SIGSTKSZ	8192
7070c1674fSDavid Howells 
7170c1674fSDavid Howells 
7270c1674fSDavid Howells #define SIG_BLOCK          0	/* for blocking signals */
7370c1674fSDavid Howells #define SIG_UNBLOCK        1	/* for unblocking signals */
7470c1674fSDavid Howells #define SIG_SETMASK        2	/* for setting the signal mask */
7570c1674fSDavid Howells 
7670c1674fSDavid Howells #define SIG_DFL	((__sighandler_t)0)	/* default signal handling */
7770c1674fSDavid Howells #define SIG_IGN	((__sighandler_t)1)	/* ignore signal */
7870c1674fSDavid Howells #define SIG_ERR	((__sighandler_t)-1)	/* error return from signal */
7970c1674fSDavid Howells 
8070c1674fSDavid Howells # ifndef __ASSEMBLY__
8170c1674fSDavid Howells 
8270c1674fSDavid Howells #  include <linux/types.h>
8370c1674fSDavid Howells 
8470c1674fSDavid Howells /* Avoid too many header ordering problems.  */
8570c1674fSDavid Howells struct siginfo;
8670c1674fSDavid Howells 
8770c1674fSDavid Howells /* Type of a signal handler.  */
88*d8f5457aSHelge Deller #if defined(__LP64__)
8970c1674fSDavid Howells /* function pointers on 64-bit parisc are pointers to little structs and the
9070c1674fSDavid Howells  * compiler doesn't support code which changes or tests the address of
9170c1674fSDavid Howells  * the function in the little struct.  This is really ugly -PB
9270c1674fSDavid Howells  */
9370c1674fSDavid Howells typedef char __user *__sighandler_t;
9470c1674fSDavid Howells #else
9570c1674fSDavid Howells typedef void __signalfn_t(int);
9670c1674fSDavid Howells typedef __signalfn_t __user *__sighandler_t;
9770c1674fSDavid Howells #endif
9870c1674fSDavid Howells 
9970c1674fSDavid Howells typedef struct sigaltstack {
10070c1674fSDavid Howells 	void __user *ss_sp;
10170c1674fSDavid Howells 	int ss_flags;
10270c1674fSDavid Howells 	size_t ss_size;
10370c1674fSDavid Howells } stack_t;
10470c1674fSDavid Howells 
10570c1674fSDavid Howells #endif /* !__ASSEMBLY */
10670c1674fSDavid Howells #endif /* _UAPI_ASM_PARISC_SIGNAL_H */
107