1 #ifndef _ASM_IA64_SIGNAL_H
2 #define _ASM_IA64_SIGNAL_H
5 * Modified 1998-2001, 2003
6 * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
8 * Unfortunately, this file is being included by bits/signal.h in
9 * glibc-2.x. Hence the #ifdef __KERNEL__ ugliness.
48 /* signal 31 is no longer "unused", but the SIGUNUSED macro remains for backwards compatibility */
51 /* These should not be considered constants from userland. */
53 #define SIGRTMAX _NSIG
58 * SA_ONSTACK indicates that a registered stack_t will be used.
59 * SA_INTERRUPT is a no-op, but left due to historical reasons.
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
79 #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
81 #define SA_RESTORER 0x04000000
84 * sigaltstack controls
90 * The minimum stack size needs to be fairly large because we want to
91 * be sure that an app compiled for today's CPUs will continue to run
92 * on all future CPU models. The CPU model matters because the signal
93 * frame needs to have space for the complete machine state, including
94 * all physical stacked registers. The number of physical stacked
95 * registers is CPU model dependent, but given that the width of
96 * ar.rsc.loadrs is 14 bits, we can assume that they'll never take up
97 * more than 16KB of space.
101 * This is a stupid typo: the value was _meant_ to be 131072 (0x20000), but I typed it
102 * in wrong. ;-( To preserve backwards compatibility, we leave the kernel at the
103 * incorrect value and fix libc only.
105 # define MINSIGSTKSZ 131027 /* min. stack size for sigaltstack() */
107 # define MINSIGSTKSZ 131072 /* min. stack size for sigaltstack() */
109 #define SIGSTKSZ 262144 /* default stack size for sigaltstack() */
115 #define _NSIG_WORDS (_NSIG / _NSIG_BPW)
118 * These values of sa_flags are used only by the kernel as part of the
119 * irq handling routines.
121 * SA_INTERRUPT is also used by the irq handling routines.
122 * SA_SHIRQ is for shared interrupt support on PCI and EISA.
124 #define SA_PROBE SA_ONESHOT
125 #define SA_SAMPLE_RANDOM SA_RESTART
126 #define SA_SHIRQ 0x04000000
127 #define SA_PERCPU_IRQ 0x02000000
129 #endif /* __KERNEL__ */
131 #define SIG_BLOCK 0 /* for blocking signals */
132 #define SIG_UNBLOCK 1 /* for unblocking signals */
133 #define SIG_SETMASK 2 /* for setting the signal mask */
135 #define SIG_DFL ((__sighandler_t)0) /* default signal handling */
136 #define SIG_IGN ((__sighandler_t)1) /* ignore signal */
137 #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
139 # ifndef __ASSEMBLY__
141 # include <linux/types.h>
143 /* Avoid too many header ordering problems. */
146 /* Type of a signal handler. */
147 typedef void __user (*__sighandler_t
)(int);
149 typedef struct sigaltstack
{
157 /* Most things should be clean enough to redefine this at will, if care
158 is taken to make libc match. */
160 typedef unsigned long old_sigset_t
;
163 unsigned long sig
[_NSIG_WORDS
];
167 __sighandler_t sa_handler
;
168 unsigned long sa_flags
;
169 sigset_t sa_mask
; /* mask last for extensibility */
176 # include <asm/sigcontext.h>
178 #define ptrace_signal_deliver(regs, cookie) do { } while (0)
180 void set_sigdelayed(pid_t pid
, int signo
, int code
, void __user
*addr
);
182 #endif /* __KERNEL__ */
184 # endif /* !__ASSEMBLY__ */
185 #endif /* _ASM_IA64_SIGNAL_H */