This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/2] mips: Remove rt_sigreturn usage on context function
- From: "Maciej W. Rozycki" <macro at linux-mips dot org>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Sat, 1 Jun 2019 03:22:18 +0100 (BST)
- Subject: Re: [PATCH 2/2] mips: Remove rt_sigreturn usage on context function
- References: <20190215141132.24404-1-adhemerval.zanella@linaro.org> <20190215141132.24404-2-adhemerval.zanella@linaro.org> <54030d10-6aa4-db18-22a4-da5da935ee93@linaro.org>
On Wed, 17 Apr 2019, Adhemerval Zanella wrote:
> If no one opposes I will commit this shortly.
>
> On 15/02/2019 12:11, Adhemerval Zanella wrote:
> > Similar to powerpc, mips also issues rt_sigreturn for setcontext
> > case the v0 value saved is not the one set by setcontext or
> > makecontext. As for powerpc, it is intention is no really supported
> > since setcontext is not async-signal-safe.
This is an obsolete interface, but FYI according to the relevant version
of SUS[1] you are supposed to be able to return from a signal handler by
calling setcontext(3) similarly to siglongjmp(3) and by removing this code
you make the context not to be fully restored in that case (on the MIPS
target the distinction is due to the DSP register state).
What do you mean by: "setcontext is not async-signal-safe"? I think such
an assertion (if indeed true) should have been explained in the commit
message even if it was previously discussed (where?).
References:
[1] <http://pubs.opengroup.org/onlinepubs/009695399/functions/setcontext.html>
Maciej