2 * BK Id: SCCS/s.signal.h 1.8 01/07/03 21:52:53 paulus
4 #ifndef _ASMPPC_SIGNAL_H
5 #define _ASMPPC_SIGNAL_H
8 #include <linux/types.h>
9 #endif /* __KERNEL__ */
11 /* Avoid too many header ordering problems. */
14 /* Most things should be clean enough to redefine this at will, if care
15 is taken to make libc match. */
19 #define _NSIG_WORDS (_NSIG / _NSIG_BPW)
21 typedef unsigned long old_sigset_t; /* at least 32 bits */
24 unsigned long sig[_NSIG_WORDS];
65 /* These should not be considered constants from userland. */
67 #define SIGRTMAX (_NSIG-1)
72 * SA_ONSTACK is not currently supported, but will allow sigaltstack(2).
73 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
74 * SA_RESTART flag to get restarting signals (which were the default long ago)
75 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
76 * SA_RESETHAND clears the handler when the signal is delivered.
77 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
78 * SA_NODEFER prevents the current signal from being masked in the handler.
80 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
81 * Unix names RESETHAND and NODEFER respectively.
83 #define SA_NOCLDSTOP 0x00000001
84 #define SA_NOCLDWAIT 0x00000002 /* not supported yet */
85 #define SA_SIGINFO 0x00000004
86 #define SA_ONSTACK 0x08000000
87 #define SA_RESTART 0x10000000
88 #define SA_NODEFER 0x40000000
89 #define SA_RESETHAND 0x80000000
91 #define SA_NOMASK SA_NODEFER
92 #define SA_ONESHOT SA_RESETHAND
93 #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
95 #define SA_RESTORER 0x04000000
98 * sigaltstack controls
103 #define MINSIGSTKSZ 2048
104 #define SIGSTKSZ 8192
108 * These values of sa_flags are used only by the kernel as part of the
109 * irq handling routines.
111 * SA_INTERRUPT is also used by the irq handling routines.
112 * SA_SHIRQ is for shared interrupt support on PCI and EISA.
114 #define SA_PROBE SA_ONESHOT
115 #define SA_SAMPLE_RANDOM SA_RESTART
116 #define SA_SHIRQ 0x04000000
117 #endif /* __KERNEL__ */
119 #define SIG_BLOCK 0 /* for blocking signals */
120 #define SIG_UNBLOCK 1 /* for unblocking signals */
121 #define SIG_SETMASK 2 /* for setting the signal mask */
123 /* Type of a signal handler. */
124 typedef void (*__sighandler_t)(int);
126 #define SIG_DFL ((__sighandler_t)0) /* default signal handling */
127 #define SIG_IGN ((__sighandler_t)1) /* ignore signal */
128 #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
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 typedef struct sigaltstack {
155 #include <asm/sigcontext.h>
156 #endif /* __KERNEL__ */