aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc64/signal.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-ppc64/signal.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-ppc64/signal.h')
-rw-r--r--include/asm-ppc64/signal.h159
1 files changed, 159 insertions, 0 deletions
diff --git a/include/asm-ppc64/signal.h b/include/asm-ppc64/signal.h
new file mode 100644
index 000000000000..fe5401adb41b
--- /dev/null
+++ b/include/asm-ppc64/signal.h
@@ -0,0 +1,159 @@
1#ifndef _ASMPPC64_SIGNAL_H
2#define _ASMPPC64_SIGNAL_H
3
4#include <linux/types.h>
5#include <linux/compiler.h>
6#include <asm/siginfo.h>
7
8/* Avoid too many header ordering problems. */
9struct siginfo;
10
11#define _NSIG 64
12#define _NSIG_BPW 64
13#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
14
15typedef unsigned long old_sigset_t; /* at least 32 bits */
16
17typedef struct {
18 unsigned long sig[_NSIG_WORDS];
19} sigset_t;
20
21#define SIGHUP 1
22#define SIGINT 2
23#define SIGQUIT 3
24#define SIGILL 4
25#define SIGTRAP 5
26#define SIGABRT 6
27#define SIGIOT 6
28#define SIGBUS 7
29#define SIGFPE 8
30#define SIGKILL 9
31#define SIGUSR1 10
32#define SIGSEGV 11
33#define SIGUSR2 12
34#define SIGPIPE 13
35#define SIGALRM 14
36#define SIGTERM 15
37#define SIGSTKFLT 16
38#define SIGCHLD 17
39#define SIGCONT 18
40#define SIGSTOP 19
41#define SIGTSTP 20
42#define SIGTTIN 21
43#define SIGTTOU 22
44#define SIGURG 23
45#define SIGXCPU 24
46#define SIGXFSZ 25
47#define SIGVTALRM 26
48#define SIGPROF 27
49#define SIGWINCH 28
50#define SIGIO 29
51#define SIGPOLL SIGIO
52/*
53#define SIGLOST 29
54*/
55#define SIGPWR 30
56#define SIGSYS 31
57#define SIGUNUSED 31
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 is not currently supported, but will allow sigaltstack(2).
67 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
68 * SA_RESTART flag to get restarting signals (which were the default long ago)
69 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
70 * SA_RESETHAND clears the handler when the signal is delivered.
71 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
72 * SA_NODEFER prevents the current signal from being masked in the handler.
73 *
74 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
75 * Unix names RESETHAND and NODEFER respectively.
76 */
77#define SA_NOCLDSTOP 0x00000001u
78#define SA_NOCLDWAIT 0x00000002u
79#define SA_SIGINFO 0x00000004u
80#define SA_ONSTACK 0x08000000u
81#define SA_RESTART 0x10000000u
82#define SA_NODEFER 0x40000000u
83#define SA_RESETHAND 0x80000000u
84
85#define SA_NOMASK SA_NODEFER
86#define SA_ONESHOT SA_RESETHAND
87#define SA_INTERRUPT 0x20000000u /* dummy -- ignored */
88
89#define SA_RESTORER 0x04000000u
90
91/*
92 * sigaltstack controls
93 */
94#define SS_ONSTACK 1
95#define SS_DISABLE 2
96
97#define MINSIGSTKSZ 2048
98#define SIGSTKSZ 8192
99#ifdef __KERNEL__
100
101/*
102 * These values of sa_flags are used only by the kernel as part of the
103 * irq handling routines.
104 *
105 * SA_INTERRUPT is also used by the irq handling routines.
106 * SA_SHIRQ is for shared interrupt support on PCI and EISA.
107 */
108#define SA_PROBE SA_ONESHOT
109#define SA_SAMPLE_RANDOM SA_RESTART
110#define SA_SHIRQ 0x04000000
111#endif
112
113#define SIG_BLOCK 0 /* for blocking signals */
114#define SIG_UNBLOCK 1 /* for unblocking signals */
115#define SIG_SETMASK 2 /* for setting the signal mask */
116
117/* Type of a signal handler. */
118typedef void __sigfunction(int);
119typedef __sigfunction __user * __sighandler_t;
120
121/* Type of the restorer function */
122typedef void __sigrestorer(void);
123typedef __sigrestorer __user * __sigrestorer_t;
124
125#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
126#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
127#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
128
129struct old_sigaction {
130 __sighandler_t sa_handler;
131 old_sigset_t sa_mask;
132 unsigned long sa_flags;
133 __sigrestorer_t sa_restorer;
134};
135
136struct sigaction {
137 __sighandler_t sa_handler;
138 unsigned long sa_flags;
139 __sigrestorer_t sa_restorer;
140 sigset_t sa_mask; /* mask last for extensibility */
141};
142
143struct k_sigaction {
144 struct sigaction sa;
145};
146
147typedef struct sigaltstack {
148 void __user *ss_sp;
149 int ss_flags;
150 size_t ss_size;
151} stack_t;
152
153struct pt_regs;
154struct timespec;
155extern int do_signal(sigset_t *oldset, struct pt_regs *regs);
156extern int do_signal32(sigset_t *oldset, struct pt_regs *regs);
157#define ptrace_signal_deliver(regs, cookie) do { } while (0)
158
159#endif /* _ASMPPC64_SIGNAL_H */