From: Daniel Jacobowitz <drow@false.org>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [non-stop] 08/10 linux native support
Date: Wed, 25 Jun 2008 22:52:00 -0000 [thread overview]
Message-ID: <20080625220247.GA5723@caradoc.them.org> (raw)
In-Reply-To: <200806252223.18858.pedro@codesourcery.com>
On Wed, Jun 25, 2008 at 10:23:18PM +0100, Pedro Alves wrote:
> A Wednesday 25 June 2008 22:17:25, Pedro Alves wrote:
> > Hmm, I was under the impression that it was possible to push more
> > than one SIGINT into a thread's signal queue, but I just tried it, and
> > it doesn't seem like it is. This check was meant to prevent that
> > happening.
>
> I'm confused. It does seem I can put more than one SIGINT in the
> queue sometimes afterall. (I just changed the code to do two kill's
> in a row instead of one). If so, the check is needed to prevent the
> race where the thread hasn't reported the stop due to the SIGINT
> yet, so is_stopped is still false, and the user is doing "interrupt"
> on it (/me imagines user clicking a bunch of times on the IDE button).
>
> The clearing on resume was just a safe place to always clear it.
Realtime signals can stack in the queue. Non-realtime signals, like
SIGINT, can not. Your first sigint is probably already delivered -
even though GDB hasn't waited for the program yet, this still counts
as dequeuing the signal. Try three, and they won't stack.
The SIGINT is not necessarily the next signal to be received. We
might get a SIGTRAP first, or anything else. So the resume has
nothing to do with whether there's an "in-flight" SIGINT. The same
complications as for SIGSTOP apply.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2008-06-25 22:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-15 21:10 Pedro Alves
2008-06-25 21:17 ` Daniel Jacobowitz
2008-06-25 22:03 ` Pedro Alves
2008-06-25 22:12 ` Pedro Alves
2008-06-25 22:52 ` Daniel Jacobowitz [this message]
2008-06-25 23:08 ` Daniel Jacobowitz
2008-07-02 3:35 ` Pedro Alves
2008-07-07 18:20 ` Daniel Jacobowitz
2008-07-09 3:25 ` Michael Snyder
2008-07-09 3:47 ` Daniel Jacobowitz
2008-07-09 3:55 ` Michael Snyder
2008-07-09 7:55 ` Mark Kettenis
2008-07-09 7:56 ` Mark Kettenis
2008-07-10 15:28 ` Pedro Alves
2008-07-10 17:15 ` Daniel Jacobowitz
2008-07-10 18:01 ` Pedro Alves
2008-07-10 19:59 ` Daniel Jacobowitz
2008-07-10 21:51 ` Pedro Alves
2008-07-10 22:15 ` Daniel Jacobowitz
2008-07-10 23:01 ` Pedro Alves
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=20080625220247.GA5723@caradoc.them.org \
--to=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.com \
/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