diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/alpha/include/signal.h | 7 | ||||
-rw-r--r-- | sys/arch/amd64/include/signal.h | 7 | ||||
-rw-r--r-- | sys/arch/arm/include/signal.h | 6 | ||||
-rw-r--r-- | sys/arch/hppa/include/signal.h | 6 | ||||
-rw-r--r-- | sys/arch/hppa64/include/signal.h | 6 | ||||
-rw-r--r-- | sys/arch/i386/include/signal.h | 6 | ||||
-rw-r--r-- | sys/arch/m68k/include/signal.h | 6 | ||||
-rw-r--r-- | sys/arch/m88k/include/signal.h | 6 | ||||
-rw-r--r-- | sys/arch/mips64/include/signal.h | 6 | ||||
-rw-r--r-- | sys/arch/powerpc/include/signal.h | 6 | ||||
-rw-r--r-- | sys/arch/sparc/include/signal.h | 6 | ||||
-rw-r--r-- | sys/arch/sparc64/include/signal.h | 6 | ||||
-rw-r--r-- | sys/arch/vax/include/signal.h | 7 | ||||
-rw-r--r-- | sys/sys/signal.h | 60 |
14 files changed, 76 insertions, 65 deletions
diff --git a/sys/arch/alpha/include/signal.h b/sys/arch/alpha/include/signal.h index b5c3acaa837..6c8314d0ae8 100644 --- a/sys/arch/alpha/include/signal.h +++ b/sys/arch/alpha/include/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.4 2005/12/14 21:46:30 millert Exp $ */ +/* $OpenBSD: signal.h,v 1.5 2006/01/08 14:20:17 millert Exp $ */ /* $NetBSD: signal.h,v 1.2 1995/02/16 03:08:08 cgd Exp $ */ /* @@ -35,7 +35,7 @@ typedef long sig_atomic_t; -#if __BSD_VISIBLE +#if __BSD_VISIBLE || __XPG_VISIBLE >= 420 /* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following @@ -60,6 +60,5 @@ struct sigcontext { long sc_reserved[2]; /* XXX */ long sc_xxx[8]; /* XXX */ }; - -#endif /* __BSD_VISIBLE */ +#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */ #endif /* !_ALPHA_SIGNAL_H_*/ diff --git a/sys/arch/amd64/include/signal.h b/sys/arch/amd64/include/signal.h index 868633c7ed3..30b3850f6a5 100644 --- a/sys/arch/amd64/include/signal.h +++ b/sys/arch/amd64/include/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.4 2005/12/14 21:46:30 millert Exp $ */ +/* $OpenBSD: signal.h,v 1.5 2006/01/08 14:20:17 millert Exp $ */ /* $NetBSD: signal.h,v 1.2 2003/04/28 23:16:17 bjh21 Exp $ */ /* @@ -41,7 +41,9 @@ typedef int sig_atomic_t; #if __BSD_VISIBLE #include <machine/trap.h> +#endif +#if __BSD_VISIBLE || __XPG_VISIBLE >= 420 /* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following @@ -82,6 +84,5 @@ struct sigcontext { int sc_onstack; int sc_mask; }; - -#endif /* __BSD_VISIBLE */ +#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */ #endif /* !_AMD64_SIGNAL_H_ */ diff --git a/sys/arch/arm/include/signal.h b/sys/arch/arm/include/signal.h index 33f907ad336..dc2942b90e4 100644 --- a/sys/arch/arm/include/signal.h +++ b/sys/arch/arm/include/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.3 2005/12/18 15:42:52 millert Exp $ */ +/* $OpenBSD: signal.h,v 1.4 2006/01/08 14:20:17 millert Exp $ */ /* $NetBSD: signal.h,v 1.5 2003/10/18 17:57:21 briggs Exp $ */ /* @@ -52,7 +52,7 @@ typedef int sig_atomic_t; -#if __BSD_VISIBLE +#if __BSD_VISIBLE || __XPG_VISIBLE >= 420 /* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following @@ -87,7 +87,7 @@ struct sigcontext { sigset_t sc_mask; /* signal mask to restore (new style) */ #endif }; -#endif /* __BSD_VISIBLE */ +#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */ #endif /* !_LOCORE */ #if defined(_LOCORE) || __BSD_VISIBLE diff --git a/sys/arch/hppa/include/signal.h b/sys/arch/hppa/include/signal.h index 3e659cdc6d6..90a72f482a8 100644 --- a/sys/arch/hppa/include/signal.h +++ b/sys/arch/hppa/include/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.6 2005/12/14 21:46:30 millert Exp $ */ +/* $OpenBSD: signal.h,v 1.7 2006/01/08 14:20:17 millert Exp $ */ /* * Copyright (c) 1994, The University of Utah and @@ -36,7 +36,9 @@ typedef int sig_atomic_t; #if __BSD_VISIBLE #include <machine/trap.h> +#endif +#if __BSD_VISIBLE || __XPG_VISIBLE >= 420 /* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following @@ -55,5 +57,5 @@ struct sigcontext { unsigned sc_regs[32]; unsigned sc_fpregs[64]; }; -#endif /* __BSD_VISIBLE */ +#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */ #endif /* !_HPPA_SIGNAL_H_ */ diff --git a/sys/arch/hppa64/include/signal.h b/sys/arch/hppa64/include/signal.h index 7d382945c97..2bc5c13a0b6 100644 --- a/sys/arch/hppa64/include/signal.h +++ b/sys/arch/hppa64/include/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.2 2005/12/14 21:46:30 millert Exp $ */ +/* $OpenBSD: signal.h,v 1.3 2006/01/08 14:20:17 millert Exp $ */ /* * Copyright (c) 1994, The University of Utah and @@ -36,7 +36,9 @@ typedef int sig_atomic_t; #if __BSD_VISIBLE #include <machine/trap.h> +#endif +#if __BSD_VISIBLE || __XPG_VISIBLE >= 420 /* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following @@ -55,5 +57,5 @@ struct sigcontext { unsigned long sc_regs[32]; unsigned long sc_fpregs[64]; }; -#endif /* __BSD_VISIBLE */ +#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */ #endif /* !_HPPA64_SIGNAL_H_ */ diff --git a/sys/arch/i386/include/signal.h b/sys/arch/i386/include/signal.h index d8443d8c091..8229bd26c5c 100644 --- a/sys/arch/i386/include/signal.h +++ b/sys/arch/i386/include/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.5 2005/12/14 21:46:30 millert Exp $ */ +/* $OpenBSD: signal.h,v 1.6 2006/01/08 14:20:17 millert Exp $ */ /* $NetBSD: signal.h,v 1.6 1996/01/08 13:51:43 mycroft Exp $ */ /* @@ -44,7 +44,9 @@ typedef int sig_atomic_t; * Get the "code" values */ #include <machine/trap.h> +#endif +#if __BSD_VISIBLE || __XPG_VISIBLE >= 420 /* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following @@ -83,5 +85,5 @@ struct sigcontext { #define sc_pc sc_eip #define sc_ps sc_eflags -#endif /* __BSD_VISIBLE */ +#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */ #endif /* !_I386_SIGNAL_H_ */ diff --git a/sys/arch/m68k/include/signal.h b/sys/arch/m68k/include/signal.h index feb2c72aa68..731b01b0a50 100644 --- a/sys/arch/m68k/include/signal.h +++ b/sys/arch/m68k/include/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.4 2005/12/14 21:46:31 millert Exp $ */ +/* $OpenBSD: signal.h,v 1.5 2006/01/08 14:20:17 millert Exp $ */ /* $NetBSD: signal.h,v 1.4 1995/01/10 19:01:31 jtc Exp $ */ /* @@ -44,7 +44,9 @@ typedef int sig_atomic_t; * Get the "code" values */ #include <machine/trap.h> +#endif +#if __BSD_VISIBLE || __XPG_VISIBLE >= 420 /* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following @@ -61,5 +63,5 @@ struct sigcontext { int sc_pc; /* pc to restore */ int sc_ps; /* psl to restore */ }; -#endif /* __BSD_VISIBLE */ +#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */ #endif /* !_M68K_SIGNAL_H_ */ diff --git a/sys/arch/m88k/include/signal.h b/sys/arch/m88k/include/signal.h index d0d5217e960..a9bc75f1328 100644 --- a/sys/arch/m88k/include/signal.h +++ b/sys/arch/m88k/include/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.2 2005/12/14 21:46:31 millert Exp $ */ +/* $OpenBSD: signal.h,v 1.3 2006/01/08 14:20:17 millert Exp $ */ /* * Copyright (c) 1996 Nivas Madhur * All rights reserved. @@ -39,7 +39,9 @@ typedef int sig_atomic_t; #if __BSD_VISIBLE #include <machine/reg.h> +#endif +#if __BSD_VISIBLE || __XPG_VISIBLE >= 420 /* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following @@ -55,5 +57,5 @@ struct sigcontext { /* begin machine dependent portion */ struct reg sc_regs; }; -#endif /* __BSD_VISIBLE */ +#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */ #endif /* __MACHINE_SIGNAL_H__ */ diff --git a/sys/arch/mips64/include/signal.h b/sys/arch/mips64/include/signal.h index 613772567f1..451443708bf 100644 --- a/sys/arch/mips64/include/signal.h +++ b/sys/arch/mips64/include/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.6 2005/12/14 21:46:31 millert Exp $ */ +/* $OpenBSD: signal.h,v 1.7 2006/01/08 14:20:17 millert Exp $ */ /* * Copyright (c) 1992, 1993 @@ -47,7 +47,7 @@ */ typedef int sig_atomic_t; -#if __BSD_VISIBLE +#if __BSD_VISIBLE || __XPG_VISIBLE >= 420 /* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following @@ -67,7 +67,7 @@ struct sigcontext { long sc_fpc_eir; /* floating point exception instruction reg */ long xxx[8]; /* XXX reserved */ }; -#endif /* __BSD_VISIBLE */ +#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */ #else /* __LANGUAGE_ASSEMBLY */ #define SC_ONSTACK (0 * REGSZ) diff --git a/sys/arch/powerpc/include/signal.h b/sys/arch/powerpc/include/signal.h index 89f2bb0dc84..95340ba7602 100644 --- a/sys/arch/powerpc/include/signal.h +++ b/sys/arch/powerpc/include/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.6 2006/01/06 18:53:05 millert Exp $ */ +/* $OpenBSD: signal.h,v 1.7 2006/01/08 14:20:17 millert Exp $ */ /* $NetBSD: signal.h,v 1.1 1996/09/30 16:34:34 ws Exp $ */ /* @@ -38,7 +38,7 @@ typedef int sig_atomic_t; -#if __BSD_VISIBLE +#if __BSD_VISIBLE || __XPG_VISIBLE >= 420 #include <machine/_types.h> /* @@ -68,5 +68,5 @@ struct sigcontext { int sc_mask; /* saved signal mask */ struct trapframe sc_frame; /* saved registers */ }; -#endif /* __BSD_VISIBLE */ +#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */ #endif /* _POWERPC_SIGNAL_H_ */ diff --git a/sys/arch/sparc/include/signal.h b/sys/arch/sparc/include/signal.h index 8d219014984..cf278a7a9f0 100644 --- a/sys/arch/sparc/include/signal.h +++ b/sys/arch/sparc/include/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.7 2005/12/18 15:42:53 millert Exp $ */ +/* $OpenBSD: signal.h,v 1.8 2006/01/08 14:20:17 millert Exp $ */ /* $NetBSD: signal.h,v 1.4 1996/02/01 22:32:35 mycroft Exp $ */ /* @@ -49,7 +49,7 @@ typedef int sig_atomic_t; -#if __BSD_VISIBLE +#if __BSD_VISIBLE || __XPG_VISIBLE >= 420 /* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following @@ -70,7 +70,7 @@ struct sigcontext { int sc_g1; /* %g1 to restore */ int sc_o0; /* %o0 to restore */ }; -#endif /* __BSD_VISIBLE */ +#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */ #else /* _LOCORE */ #define SC_SP_OFFSET 8 #define SC_PC_OFFSET 12 diff --git a/sys/arch/sparc64/include/signal.h b/sys/arch/sparc64/include/signal.h index 48a5ebc4595..aec130fb7e2 100644 --- a/sys/arch/sparc64/include/signal.h +++ b/sys/arch/sparc64/include/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.7 2005/12/18 15:42:53 millert Exp $ */ +/* $OpenBSD: signal.h,v 1.8 2006/01/08 14:20:17 millert Exp $ */ /* $NetBSD: signal.h,v 1.10 2001/05/09 19:50:49 kleink Exp $ */ /* @@ -49,7 +49,7 @@ typedef int sig_atomic_t; -#if __BSD_VISIBLE +#if __BSD_VISIBLE || __XPG_VISIBLE >= 420 /* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following @@ -71,7 +71,7 @@ struct sigcontext { long sc_o0; /* %o0 to restore */ int sc_mask; /* signal mask to restore (new style) */ }; -#endif /* __BSD_VISIBLE */ +#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */ #endif /* _LOCORE */ #if defined(_LOCORE) || __BSD_VISIBLE diff --git a/sys/arch/vax/include/signal.h b/sys/arch/vax/include/signal.h index 9e668b79021..75909a59e2e 100644 --- a/sys/arch/vax/include/signal.h +++ b/sys/arch/vax/include/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.4 2005/12/14 21:46:31 millert Exp $ */ +/* $OpenBSD: signal.h,v 1.5 2006/01/08 14:20:17 millert Exp $ */ /* $NetBSD: signal.h,v 1.4 1995/01/10 19:01:52 jtc Exp $ */ /* @@ -41,7 +41,7 @@ typedef int sig_atomic_t; -#if __BSD_VISIBLE +#if __BSD_VISIBLE || __XPG_VISIBLE >= 420 /* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following @@ -58,6 +58,5 @@ struct sigcontext { int sc_pc; /* pc to restore */ int sc_ps; /* psl to restore */ }; - -#endif /* __BSD_VISIBLE */ +#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */ #endif /* !_VAX_SIGNAL_H_ */ diff --git a/sys/sys/signal.h b/sys/sys/signal.h index b078ca43e32..7b01c019459 100644 --- a/sys/sys/signal.h +++ b/sys/sys/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.18 2005/12/13 00:35:23 millert Exp $ */ +/* $OpenBSD: signal.h,v 1.19 2006/01/08 14:20:16 millert Exp $ */ /* $NetBSD: signal.h,v 1.21 1996/02/09 18:25:32 christos Exp $ */ /* @@ -144,27 +144,6 @@ struct sigaction { typedef void (*sig_t)(int); /* type of signal function */ /* - * Structure used in sigaltstack call. - */ -typedef struct sigaltstack { - void *ss_sp; /* signal stack base */ - size_t ss_size; /* signal stack length */ - int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */ -} stack_t; -#define SS_ONSTACK 0x0001 /* take signals on alternate stack */ -#define SS_DISABLE 0x0004 /* disable taking signals on alternate stack */ -#define MINSIGSTKSZ 8192 /* minimum allowable stack */ -#define SIGSTKSZ (MINSIGSTKSZ + 32768) /* recommended stack size */ - -#ifdef _KERNEL -struct osigaltstack { - void *ss_sp; /* signal stack base */ - int ss_size; /* signal stack length */ - int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */ -}; -#endif - -/* * 4.3 compatibility: * Signal vector "template" used in sigvec call. */ @@ -179,6 +158,17 @@ struct sigvec { #define sv_onstack sv_flags /* isn't compatibility wonderful! */ /* + * Macro for converting signal number to a mask suitable for + * sigblock(). + */ +#define sigmask(m) (1 << ((m)-1)) + +#define BADSIG SIG_ERR + +#endif /* __BSD_VISIBLE */ + +#if __BSD_VISIBLE || __XPG_VISIBLE >= 420 +/* * Structure used in sigstack call. */ struct sigstack { @@ -186,17 +176,29 @@ struct sigstack { int ss_onstack; /* current status */ }; -typedef struct sigcontext ucontext_t; - /* - * Macro for converting signal number to a mask suitable for - * sigblock(). + * Structure used in sigaltstack call. */ -#define sigmask(m) (1 << ((m)-1)) +typedef struct sigaltstack { + void *ss_sp; /* signal stack base */ + size_t ss_size; /* signal stack length */ + int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */ +} stack_t; +#define SS_ONSTACK 0x0001 /* take signals on alternate stack */ +#define SS_DISABLE 0x0004 /* disable taking signals on alternate stack */ +#define MINSIGSTKSZ 8192 /* minimum allowable stack */ +#define SIGSTKSZ (MINSIGSTKSZ + 32768) /* recommended stack size */ -#define BADSIG SIG_ERR +#ifdef _KERNEL +struct osigaltstack { + void *ss_sp; /* signal stack base */ + int ss_size; /* signal stack length */ + int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */ +}; +#endif -#endif /* __BSD_VISIBLE */ +typedef struct sigcontext ucontext_t; +#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */ /* * For historical reasons; programs expect signal's return value to be |