Merge branch 'work.cramfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[sfrench/cifs-2.6.git] / arch / alpha / include / uapi / asm / signal.h
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 /*
64  * SA_FLAGS values:
65  *
66  * SA_ONSTACK indicates that a registered stack_t will be used.
67  * SA_RESTART flag to get restarting signals (which were the default long ago)
68  * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
69  * SA_RESETHAND clears the handler when the signal is delivered.
70  * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
71  * SA_NODEFER prevents the current signal from being masked in the handler.
72  *
73  * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
74  * Unix names RESETHAND and NODEFER respectively.
75  */
76
77 #define SA_ONSTACK      0x00000001
78 #define SA_RESTART      0x00000002
79 #define SA_NOCLDSTOP    0x00000004
80 #define SA_NODEFER      0x00000008
81 #define SA_RESETHAND    0x00000010
82 #define SA_NOCLDWAIT    0x00000020
83 #define SA_SIGINFO      0x00000040
84
85 #define SA_ONESHOT      SA_RESETHAND
86 #define SA_NOMASK       SA_NODEFER
87
88 #define MINSIGSTKSZ     4096
89 #define SIGSTKSZ        16384
90
91 #define SIG_BLOCK          1    /* for blocking signals */
92 #define SIG_UNBLOCK        2    /* for unblocking signals */
93 #define SIG_SETMASK        3    /* for setting the signal mask */
94
95 #include <asm-generic/signal-defs.h>
96
97 #ifndef __KERNEL__
98 /* Here we must cater to libcs that poke about in kernel headers.  */
99
100 struct sigaction {
101         union {
102           __sighandler_t        _sa_handler;
103           void (*_sa_sigaction)(int, struct siginfo *, void *);
104         } _u;
105         sigset_t        sa_mask;
106         int             sa_flags;
107 };
108
109 #define sa_handler      _u._sa_handler
110 #define sa_sigaction    _u._sa_sigaction
111
112 #endif /* __KERNEL__ */
113
114 typedef struct sigaltstack {
115         void __user *ss_sp;
116         int ss_flags;
117         size_t ss_size;
118 } stack_t;
119
120 /* sigstack(2) is deprecated, and will be withdrawn in a future version
121    of the X/Open CAE Specification.  Use sigaltstack instead.  It is only
122    implemented here for OSF/1 compatibility.  */
123
124 struct sigstack {
125         void __user *ss_sp;
126         int ss_onstack;
127 };
128
129
130 #endif /* _UAPI_ASMAXP_SIGNAL_H */