This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [non-stop] 08/10 linux native support
A Wednesday 25 June 2008 22:17:25, Pedro Alves wrote:
> A Wednesday 25 June 2008 21:19:46, Daniel Jacobowitz wrote:
> > > @@ -1489,6 +1580,9 @@ linux_nat_resume (ptid_t ptid, int step,
> > > /* Mark this LWP as resumed. */
> > > lp->resumed = 1;
> > >
> > > + /* Remove the SIGINT mark. Used in non-stop mode. */
> > > + lp->sigint = 0;
> > > +
> >
> > Confused. Why does resuming the thread affect whether we have sent it
> > a SIGINT, but not received it back yet?
>
> 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.
--
Pedro Alves