2 * arch/ubicom32/include/asm/signal.h
3 * Signal related definitions for Ubicom32 architecture.
5 * (C) Copyright 2009, Ubicom, Inc.
7 * This file is part of the Ubicom32 Linux Kernel Port.
9 * The Ubicom32 Linux Kernel Port is free software: you can redistribute
10 * it and/or modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation, either version 2 of the
12 * License, or (at your option) any later version.
14 * The Ubicom32 Linux Kernel Port is distributed in the hope that it
15 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
16 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
17 * the GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with the Ubicom32 Linux Kernel Port. If not,
21 * see <http://www.gnu.org/licenses/>.
23 * Ubicom32 implementation derived from (with many thanks):
28 #ifndef _ASM_UBICOM32_SIGNAL_H
29 #define _ASM_UBICOM32_SIGNAL_H
31 #include <linux/types.h>
33 /* Avoid too many header ordering problems. */
37 /* Most things should be clean enough to redefine this at will, if care
38 is taken to make libc match. */
42 #define _NSIG_WORDS (_NSIG / _NSIG_BPW)
44 typedef unsigned long old_sigset_t; /* at least 32 bits */
47 unsigned long sig[_NSIG_WORDS];
50 #endif /* __KERNEL__ */
90 /* These should not be considered constants from userland. */
92 #define SIGRTMAX _NSIG
97 * SA_ONSTACK indicates that a registered stack_t will be used.
98 * SA_RESTART flag to get restarting signals (which were the default long ago)
99 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
100 * SA_RESETHAND clears the handler when the signal is delivered.
101 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
102 * SA_NODEFER prevents the current signal from being masked in the handler.
104 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
105 * Unix names RESETHAND and NODEFER respectively.
107 #define SA_NOCLDSTOP 0x00000001
108 #define SA_NOCLDWAIT 0x00000002
109 #define SA_SIGINFO 0x00000004
110 #define SA_ONSTACK 0x08000000
111 #define SA_RESTART 0x10000000
112 #define SA_NODEFER 0x40000000
113 #define SA_RESETHAND 0x80000000
115 #define SA_NOMASK SA_NODEFER
116 #define SA_ONESHOT SA_RESETHAND
119 * sigaltstack controls
124 #define MINSIGSTKSZ 2048
125 #define SIGSTKSZ 8192
127 #include <asm-generic/signal.h>
130 struct old_sigaction {
131 __sighandler_t sa_handler;
132 old_sigset_t sa_mask;
133 unsigned long sa_flags;
134 void (*sa_restorer)(void);
138 __sighandler_t sa_handler;
139 unsigned long sa_flags;
140 void (*sa_restorer)(void);
141 sigset_t sa_mask; /* mask last for extensibility */
148 /* Here we must cater to libcs that poke about in kernel headers. */
152 __sighandler_t _sa_handler;
153 void (*_sa_sigaction)(int, struct siginfo *, void *);
156 unsigned long sa_flags;
157 void (*sa_restorer)(void);
160 #define sa_handler _u._sa_handler
161 #define sa_sigaction _u._sa_sigaction
163 #endif /* __KERNEL__ */
165 typedef struct sigaltstack {
173 #include <asm/sigcontext.h>
174 #undef __HAVE_ARCH_SIG_BITOPS
176 #define ptrace_signal_deliver(regs, cookie) do { } while (0)
178 #endif /* __KERNEL__ */
180 #endif /* _ASM_UBICOM32_SIGNAL_H */