From: Laszlo Ersek <lersek@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH RFC] main loop: fix some accesses made in sighandler context
Date: Fri, 16 Sep 2011 09:58:00 +0200 [thread overview]
Message-ID: <4E730188.7090103@redhat.com> (raw)
In-Reply-To: <CAFEAcA_NpbCy8mLyRu4JDmSDn2jjuYk_fYz1mKnYnh6kr6VDGw@mail.gmail.com>
On 09/15/11 21:44, Peter Maydell wrote:
> On 15 September 2011 18:22, Laszlo Ersek<lersek@redhat.com> wrote:
>> -int no_shutdown = 0;
>> +volatile int no_shutdown = 0;
>
> So why 'volatile' and not 'sig_atomic_t', then?
The sigaction() spec says"volatile sig_atomic_t", so that would be
ideal. My assumption was that "sig_atomic_t" (which is allowed by POSIX
not to be wider than "char") would be in practice at least as wide as
"int" and "pid_t". Should my assumption be wrong on some platforms,
qualifying the variables "volatile" while keeping their current types
(int / pid_t) does less damage (no damage) than narrowing their types.
lacos
next prev parent reply other threads:[~2011-09-16 7:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-15 17:22 [Qemu-devel] [PATCH RFC] main loop: fix some accesses made in sighandler context Laszlo Ersek
2011-09-15 19:16 ` Anthony Liguori
2011-09-16 8:08 ` Laszlo Ersek
2011-09-15 19:44 ` Peter Maydell
2011-09-16 7:58 ` Laszlo Ersek [this message]
2011-09-16 9:09 ` Markus Armbruster
2011-09-16 8:52 ` [Qemu-devel] [PATCH v2] " Laszlo Ersek
-- strict thread matches above, loose matches on Subject: below --
2011-09-16 14:31 [Qemu-devel] [PATCH RFC] " Eric Blake
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=4E730188.7090103@redhat.com \
--to=lersek@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).