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