From ed3abcbb0de655fa883b49af28dceb1945db7a20 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 26 Oct 2016 17:37:08 +0000 Subject: [PATCH] Correct definition of 'struct sigcontext' on MIPS. Add missing fields ('sr' and 'mc_tls') to 'struct sigcontext'. The kernel doesn't use 'struct sigcontext' but instead uses 'ucontext_t' which includes 'mcontext_t' in 'struct sigframe' to build the signal frame. As a result, this change is not an ABI change but simply making 'struct sigcontext' correct. Note that 'struct sigcontext' is only used for "Traditional BSD style" signal handlers. While here, rename the 'xxx' field to '__spare__' to match 'mcontext_t'. Sponsored by: DARPA, AFRL --- sys/mips/include/signal.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/mips/include/signal.h b/sys/mips/include/signal.h index 5107af05bba..f808d3ff6e4 100644 --- a/sys/mips/include/signal.h +++ b/sys/mips/include/signal.h @@ -68,11 +68,13 @@ struct sigcontext { int sc_onstack; /* sigstack state to restore */ __register_t sc_pc; /* pc at time of signal */ __register_t sc_regs[32]; /* processor regs 0 to 31 */ + __register_t sr; /* status register */ __register_t mullo, mulhi; /* mullo and mulhi registers... */ int sc_fpused; /* fp has been used */ f_register_t sc_fpregs[33]; /* fp regs 0 to 31 and csr */ __register_t sc_fpc_eir; /* fp exception instruction reg */ - int xxx[8]; /* XXX reserved */ + void *sc_tls; /* pointer to TLS area */ + int __spare__[8]; /* XXX reserved */ }; #endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */