From: Felix Janda <felix.janda@posteo.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
Riku Voipio <riku.voipio@iki.fi>
Subject: Re: [Qemu-devel] [PATCH RFC] linux-user: peform __SIGRTMIN hack only when __SIGRTMIN is defined
Date: Fri, 30 Sep 2016 23:33:49 -0400 [thread overview]
Message-ID: <20161001033349.GB23216@nyan> (raw)
In-Reply-To: <CAFEAcA-CvCUnnVeJz+-hf-MV0C7B98noiVzDz6QXxsXEzQJZQQ@mail.gmail.com>
Peter Maydell wrote:
> On 30 September 2016 at 16:41, Felix Janda <felix.janda@posteo.de> wrote:
> > This fixes a compilation error with the musl c library.
> > ---
> > I don't really understand the purpose of the hack, which was
> > introduced in
> >
> > http://git.qemu.org/?p=qemu.git;a=commit;h=624f7979058b84cbf81c76d45f302ce757b213ca
> >
> > but musl does not have a separate thread library (it is included in
> > libc.so), so I doubt that the hack is applies to it.
>
> The reason for the hack is that glibc uses SIGRTMAX (ie signal 63)
> for its own internal purposes (it uses it for between-thread
> communication to implement the posix threading APIs). If we
> didn't reverse SIGRTMIN and SIGRTMAX then both the glibc in
> the host process and the glibc in the guest process would try
> to use the same signal and the guest's threading APIs would
> break.
Thanks for explaining this.
> I'm pretty sure musl is going to need to use a signal to
> implement threads too, so I expect this hack will be
> needed there too, not just on glibc.
musl uses signal 34 (internally called SIGSYNCCALL) to implement
threads.
> It would be better to figure out how to identify the
> range of RT signals on musl...
musl has SIGRTMIN and SIGRTMAX, but these resolve to functions
__libc_current_sigrtmin() and __libc_current_sigrtmax(). The first
always returns 35, the second _NSIG-1.
But how do these matter? Isn't it only important that signal 34 gets
remapped?
Felix
prev parent reply other threads:[~2016-10-01 3:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-30 23:41 [Qemu-devel] [PATCH RFC] linux-user: peform __SIGRTMIN hack only when __SIGRTMIN is defined Felix Janda
2016-09-30 23:52 ` no-reply
2016-10-01 2:34 ` Peter Maydell
2016-10-01 3:33 ` Felix Janda [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161001033349.GB23216@nyan \
--to=felix.janda@posteo.de \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.