svn commit: r307971 - head/sys/mips/include
John Baldwin
jhb at freebsd.org
Fri Oct 28 15:15:16 UTC 2016
On Wednesday, October 26, 2016 05:37:08 PM John Baldwin wrote:
> Author: jhb
> Date: Wed Oct 26 17:37:08 2016
> New Revision: 307971
> URL: https://svnweb.freebsd.org/changeset/base/307971
>
> Log:
> 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
We should perhaps a static assertion somewhere that
sizeof(sigset_t) + sizeof(ucontext_t) == sizeof(struct sigcontext) if
that is really true of all of our architectures.
Alternatively, we might consider retiring 'struct sigcontext' altogether.
It's purpose has been superseded by SA_SIGINFO (which is more portable)
which has been around for quite a while now. As a first step I guess
we could try an exp-run with 'struct sigcontext' removed. (We should
have ditched this in 5.0 since we have a separate sendsig/sigreturn path
for FreeBSD 4.x already. Oh well.)
--
John Baldwin
More information about the svn-src-all
mailing list