asm-generic: rename termios.h, signal.h and mman.h
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / microblaze / include / asm / signal.h
blob46bc2267d9497a751de01b75324120b384f4ce5f
1 /*
2 * Copyright (C) 2006 Atmark Techno, Inc.
3 * Yasushi SHOJI <yashi@atmark-techno.com>
4 * Tetsuya OHKAWA <tetsuya@atmark-techno.com>
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
11 #ifndef _ASM_MICROBLAZE_SIGNAL_H
12 #define _ASM_MICROBLAZE_SIGNAL_H
14 #define SIGHUP 1
15 #define SIGINT 2
16 #define SIGQUIT 3
17 #define SIGILL 4
18 #define SIGTRAP 5
19 #define SIGABRT 6
20 #define SIGIOT 6
21 #define SIGBUS 7
22 #define SIGFPE 8
23 #define SIGKILL 9
24 #define SIGUSR1 10
25 #define SIGSEGV 11
26 #define SIGUSR2 12
27 #define SIGPIPE 13
28 #define SIGALRM 14
29 #define SIGTERM 15
30 #define SIGSTKFLT 16
31 #define SIGCHLD 17
32 #define SIGCONT 18
33 #define SIGSTOP 19
34 #define SIGTSTP 20
35 #define SIGTTIN 21
36 #define SIGTTOU 22
37 #define SIGURG 23
38 #define SIGXCPU 24
39 #define SIGXFSZ 25
40 #define SIGVTALRM 26
41 #define SIGPROF 27
42 #define SIGWINCH 28
43 #define SIGIO 29
44 #define SIGPOLL SIGIO
46 #define SIGLOST 29
48 #define SIGPWR 30
49 #define SIGSYS 31
50 #define SIGUNUSED 31
52 /* These should not be considered constants from userland. */
53 #define SIGRTMIN 32
54 #define SIGRTMAX _NSIG
57 * SA_FLAGS values:
59 * SA_ONSTACK indicates that a registered stack_t will be used.
60 * SA_RESTART flag to get restarting signals (which were the default long ago)
61 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
62 * SA_RESETHAND clears the handler when the signal is delivered.
63 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
64 * SA_NODEFER prevents the current signal from being masked in the handler.
66 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
67 * Unix names RESETHAND and NODEFER respectively.
69 #define SA_NOCLDSTOP 0x00000001
70 #define SA_NOCLDWAIT 0x00000002
71 #define SA_SIGINFO 0x00000004
72 #define SA_ONSTACK 0x08000000
73 #define SA_RESTART 0x10000000
74 #define SA_NODEFER 0x40000000
75 #define SA_RESETHAND 0x80000000
77 #define SA_NOMASK SA_NODEFER
78 #define SA_ONESHOT SA_RESETHAND
80 #define SA_RESTORER 0x04000000
83 * sigaltstack controls
85 #define SS_ONSTACK 1
86 #define SS_DISABLE 2
88 #define MINSIGSTKSZ 2048
89 #define SIGSTKSZ 8192
91 # ifndef __ASSEMBLY__
92 # include <linux/types.h>
93 # include <asm-generic/signal-defs.h>
95 /* Avoid too many header ordering problems. */
96 struct siginfo;
98 # ifdef __KERNEL__
100 * Most things should be clean enough to redefine this at will, if care
101 * is taken to make libc match.
103 # define _NSIG 64
104 # define _NSIG_BPW 32
105 # define _NSIG_WORDS (_NSIG / _NSIG_BPW)
107 typedef unsigned long old_sigset_t; /* at least 32 bits */
109 typedef struct {
110 unsigned long sig[_NSIG_WORDS];
111 } sigset_t;
113 struct old_sigaction {
114 __sighandler_t sa_handler;
115 old_sigset_t sa_mask;
116 unsigned long sa_flags;
117 void (*sa_restorer)(void);
120 struct sigaction {
121 __sighandler_t sa_handler;
122 unsigned long sa_flags;
123 void (*sa_restorer)(void);
124 sigset_t sa_mask; /* mask last for extensibility */
127 struct k_sigaction {
128 struct sigaction sa;
131 # include <asm/sigcontext.h>
132 # undef __HAVE_ARCH_SIG_BITOPS
134 # define ptrace_signal_deliver(regs, cookie) do { } while (0)
136 # else /* !__KERNEL__ */
138 /* Here we must cater to libcs that poke about in kernel headers. */
140 # define NSIG 32
141 typedef unsigned long sigset_t;
143 struct sigaction {
144 union {
145 __sighandler_t _sa_handler;
146 void (*_sa_sigaction)(int, struct siginfo *, void *);
147 } _u;
148 sigset_t sa_mask;
149 unsigned long sa_flags;
150 void (*sa_restorer)(void);
153 # define sa_handler _u._sa_handler
154 # define sa_sigaction _u._sa_sigaction
156 # endif /* __KERNEL__ */
158 typedef struct sigaltstack {
159 void *ss_sp;
160 int ss_flags;
161 size_t ss_size;
162 } stack_t;
164 # endif /* __ASSEMBLY__ */
165 #endif /* _ASM_MICROBLAZE_SIGNAL_H */