Module Name: src Committed By: matt Date: Thu Aug 27 17:47:30 UTC 2009
Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: signal.h Log Message: For the kernel (since we only use it in compability with O32) define sigcontext with ints. For libc, define the way we want to use it for jmpbuf since that will be the only consumer of it. To generate a diff of this commit: cvs rdiff -u -r1.27.92.2 -r1.27.92.3 src/sys/arch/mips/include/signal.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/mips/include/signal.h diff -u src/sys/arch/mips/include/signal.h:1.27.92.2 src/sys/arch/mips/include/signal.h:1.27.92.3 --- src/sys/arch/mips/include/signal.h:1.27.92.2 Sun Aug 23 04:04:35 2009 +++ src/sys/arch/mips/include/signal.h Thu Aug 27 17:47:30 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: signal.h,v 1.27.92.2 2009/08/23 04:04:35 matt Exp $ */ +/* $NetBSD: signal.h,v 1.27.92.3 2009/08/27 17:47:30 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -75,9 +75,9 @@ struct sigcontext13 { int sc_onstack; /* sigstack state to restore */ int sc_mask; /* signal mask to restore (old style) */ - mips_reg_t sc_pc; /* pc at time of signal */ - mips_reg_t sc_regs[32]; /* processor regs 0 to 31 */ - mips_reg_t mullo, mulhi;/* mullo and mulhi registers... */ + int sc_pc; /* pc at time of signal */ + int sc_regs[32]; /* processor regs 0 to 31 */ + int mullo, mulhi; /* mullo and mulhi registers... */ int sc_fpused; /* fp has been used */ int sc_fpregs[33]; /* fp regs 0 to 31 and csr */ int sc_fpc_eir; /* floating point exception instruction reg */ @@ -89,18 +89,32 @@ /* * Only need an O32 version. */ -struct sigcontext { - int sc_onstack; /* sigstack state to restore */ - int __sc_mask13; /* signal mask to restore (old style) */ - int sc_pc; /* pc at time of signal */ - int sc_regs[32]; /* processor regs 0 to 31 */ - int mullo, mulhi; /* mullo and mulhi registers... */ - int sc_fpused; /* fp has been used */ - int sc_fpregs[33]; /* fp regs 0 to 31 and csr */ - int sc_fpc_eir; /* floating point exception instruction reg */ - int sc_xxx[8]; /* XXX reserved */ - sigset_t sc_mask; /* signal mask to restore (new style) */ -}; +#define _SIGCONTEXT_DEFINE(_name, _reg_t, _fp_t) \ +struct sigcontext { \ + int sc_onstack; /* sigstack state to restore */ \ + int __sc_mask13; /* signal mask to restore (old style) */ \ + _reg_t sc_pc; /* pc at time of signal */ \ + _reg_t sc_regs[32]; /* processor regs 0 to 31 */ \ + _reg_t mullo, mulhi; /* mullo and mulhi registers... */ \ + int sc_fpused; /* fp has been used */ \ + _fp_t sc_fpregs[33]; /* fp regs 0 to 31 and csr */ \ + int sc_fpc_eir; /* floating point exception instruction reg */ \ + int sc_xxx[8]; /* XXX reserved */ \ + sigset_t sc_mask; /* signal mask to restore (new style) */ \ +} + +/* + * These will be identical in O32 + */ +#ifdef _KERNEL +/* + * We need this only compatibility. + */ +_SIGCONTEXT_DEFINE(sigcontext, int, int); +#endif +#ifdef _LIBC +_SIGCONTEXT_DEFINE(sigcontext, register_t, fpregister_t); +#endif #endif /* _LIBC || _KERNEL */