* RFC: patch to lin-lwp.c
@ 2003-08-05 23:22 J. Johnston
2003-08-06 17:11 ` J. Johnston
0 siblings, 1 reply; 7+ messages in thread
From: J. Johnston @ 2003-08-05 23:22 UTC (permalink / raw)
To: gdb-patches
The attached patch is created to deal with the problem as discussed on:
http://sources.redhat.com/ml/gdb/2003-08/msg00043.html
The fix does two things:
1. it sets the resumed flag for threads we stopped when the main thread
exited and then resumed
2. changes the running_callback to include threads that have events
pending on them that will be caught on the next wait
Ok to commit?
-- Jeff J.
2003-08-05 Jeff Johnston <jjohnstn@redhat.com>
* lin-lwp-wait.c (stop_and_resume_callback): Set the resumed flag
for any lwp we resume.
(running_callback): Add lwps that have pending status events
against them to be considered running.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: RFC: patch to lin-lwp.c
2003-08-05 23:22 RFC: patch to lin-lwp.c J. Johnston
@ 2003-08-06 17:11 ` J. Johnston
2003-10-04 21:41 ` Daniel Jacobowitz
2003-10-08 18:00 ` Daniel Jacobowitz
0 siblings, 2 replies; 7+ messages in thread
From: J. Johnston @ 2003-08-06 17:11 UTC (permalink / raw)
To: J. Johnston; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 774 bytes --]
Sorry, forgot to attach patch.
J. Johnston wrote:
> The attached patch is created to deal with the problem as discussed on:
>
> http://sources.redhat.com/ml/gdb/2003-08/msg00043.html
>
> The fix does two things:
>
> 1. it sets the resumed flag for threads we stopped when the main thread
> exited and then resumed
> 2. changes the running_callback to include threads that have events
> pending on them that will be caught on the next wait
>
> Ok to commit?
>
> -- Jeff J.
>
> 2003-08-05 Jeff Johnston <jjohnstn@redhat.com>
>
> * lin-lwp-wait.c (stop_and_resume_callback): Set the resumed flag
> for any lwp we resume.
> (running_callback): Add lwps that have pending status events
> against them to be considered running.
>
>
>
[-- Attachment #2: lin-lwp.patch --]
[-- Type: text/plain, Size: 769 bytes --]
Index: lin-lwp.c
===================================================================
RCS file: /cvs/src/src/gdb/lin-lwp.c,v
retrieving revision 1.47
diff -u -r1.47 lin-lwp.c
--- lin-lwp.c 19 Jun 2003 22:52:03 -0000 1.47
+++ lin-lwp.c 5 Aug 2003 23:09:55 -0000
@@ -839,7 +839,7 @@
static int
running_callback (struct lwp_info *lp, void *data)
{
- return (lp->stopped == 0);
+ return (lp->stopped == 0 || (lp->status != 0 && lp->resumed));
}
/* Count the LWP's that have had events. */
@@ -1087,7 +1087,10 @@
/* Resume if the lwp still exists. */
for (ptr = lwp_list; ptr; ptr = ptr->next)
if (lp == ptr)
- resume_callback (lp, NULL);
+ {
+ resume_callback (lp, NULL);
+ resume_set_callback (lp, NULL);
+ }
}
return 0;
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: RFC: patch to lin-lwp.c
2003-08-06 17:11 ` J. Johnston
@ 2003-10-04 21:41 ` Daniel Jacobowitz
2003-10-08 0:19 ` Michael Snyder
2003-10-08 18:00 ` Daniel Jacobowitz
1 sibling, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2003-10-04 21:41 UTC (permalink / raw)
To: gdb-patches; +Cc: msnyder, kettenis
This patch was never reviewed as far as I can see. I just got a bug
report that I think it would fix...
Mark, you've said that you don't feel comfortable maintaining the
Linux-specific threading layer, is that recollection right? Michael,
do you? If not, I'd like to clearly indicate who can approve patches
to lin-lwp.c.
On Wed, Aug 06, 2003 at 01:11:09PM -0400, J. Johnston wrote:
> Sorry, forgot to attach patch.
>
> J. Johnston wrote:
> >The attached patch is created to deal with the problem as discussed on:
> >
> > http://sources.redhat.com/ml/gdb/2003-08/msg00043.html
> >
> >The fix does two things:
> >
> > 1. it sets the resumed flag for threads we stopped when the main thread
> > exited and then resumed
> > 2. changes the running_callback to include threads that have events
> > pending on them that will be caught on the next wait
> >
> >Ok to commit?
> >
> >-- Jeff J.
> >
> >2003-08-05 Jeff Johnston <jjohnstn@redhat.com>
> >
> > * lin-lwp-wait.c (stop_and_resume_callback): Set the resumed flag
> > for any lwp we resume.
> > (running_callback): Add lwps that have pending status events
> > against them to be considered running.
> >
> >
> >
>
> Index: lin-lwp.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/lin-lwp.c,v
> retrieving revision 1.47
> diff -u -r1.47 lin-lwp.c
> --- lin-lwp.c 19 Jun 2003 22:52:03 -0000 1.47
> +++ lin-lwp.c 5 Aug 2003 23:09:55 -0000
> @@ -839,7 +839,7 @@
> static int
> running_callback (struct lwp_info *lp, void *data)
> {
> - return (lp->stopped == 0);
> + return (lp->stopped == 0 || (lp->status != 0 && lp->resumed));
> }
>
> /* Count the LWP's that have had events. */
> @@ -1087,7 +1087,10 @@
> /* Resume if the lwp still exists. */
> for (ptr = lwp_list; ptr; ptr = ptr->next)
> if (lp == ptr)
> - resume_callback (lp, NULL);
> + {
> + resume_callback (lp, NULL);
> + resume_set_callback (lp, NULL);
> + }
> }
> return 0;
> }
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: RFC: patch to lin-lwp.c
2003-10-04 21:41 ` Daniel Jacobowitz
@ 2003-10-08 0:19 ` Michael Snyder
2003-10-08 17:57 ` Andrew Cagney
0 siblings, 1 reply; 7+ messages in thread
From: Michael Snyder @ 2003-10-08 0:19 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches, kettenis
Daniel Jacobowitz wrote:
> This patch was never reviewed as far as I can see. I just got a bug
> report that I think it would fix...
>
> Mark, you've said that you don't feel comfortable maintaining the
> Linux-specific threading layer, is that recollection right? Michael,
> do you?
Barely. I felt about 50% able to grok it when I last worked on it,
and it's changed a lot since then.
> If not, I'd like to clearly indicate who can approve patches
> to lin-lwp.c.
It's more who ought to than who can. I think any of you, me,
Mark, or Jim Blandy (and maybe we ought to add Jeff Johnston)
are qualified to approve them, but I don't know which one or
two persons understand it fully enough to be called on as a
maintainer. Jim and I, for instance, worked on it a long time
ago.
Part of the problem, I think, is that nobody really wants it.
It's complicated, difficult, and fragile.
>
> On Wed, Aug 06, 2003 at 01:11:09PM -0400, J. Johnston wrote:
>
>>Sorry, forgot to attach patch.
>>
>>J. Johnston wrote:
>>
>>>The attached patch is created to deal with the problem as discussed on:
>>>
>>> http://sources.redhat.com/ml/gdb/2003-08/msg00043.html
>>>
>>>The fix does two things:
>>>
>>> 1. it sets the resumed flag for threads we stopped when the main thread
>>> exited and then resumed
>>> 2. changes the running_callback to include threads that have events
>>> pending on them that will be caught on the next wait
>>>
>>>Ok to commit?
>>>
>>>-- Jeff J.
>>>
>>>2003-08-05 Jeff Johnston <jjohnstn@redhat.com>
>>>
>>> * lin-lwp-wait.c (stop_and_resume_callback): Set the resumed flag
>>> for any lwp we resume.
>>> (running_callback): Add lwps that have pending status events
>>> against them to be considered running.
>>>
>>>
>>>
>>
>
>>Index: lin-lwp.c
>>===================================================================
>>RCS file: /cvs/src/src/gdb/lin-lwp.c,v
>>retrieving revision 1.47
>>diff -u -r1.47 lin-lwp.c
>>--- lin-lwp.c 19 Jun 2003 22:52:03 -0000 1.47
>>+++ lin-lwp.c 5 Aug 2003 23:09:55 -0000
>>@@ -839,7 +839,7 @@
>> static int
>> running_callback (struct lwp_info *lp, void *data)
>> {
>>- return (lp->stopped == 0);
>>+ return (lp->stopped == 0 || (lp->status != 0 && lp->resumed));
>> }
>>
>> /* Count the LWP's that have had events. */
>>@@ -1087,7 +1087,10 @@
>> /* Resume if the lwp still exists. */
>> for (ptr = lwp_list; ptr; ptr = ptr->next)
>> if (lp == ptr)
>>- resume_callback (lp, NULL);
>>+ {
>>+ resume_callback (lp, NULL);
>>+ resume_set_callback (lp, NULL);
>>+ }
>> }
>> return 0;
>> }
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: RFC: patch to lin-lwp.c
2003-10-08 0:19 ` Michael Snyder
@ 2003-10-08 17:57 ` Andrew Cagney
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Cagney @ 2003-10-08 17:57 UTC (permalink / raw)
To: Michael Snyder; +Cc: Daniel Jacobowitz, gdb-patches, kettenis
>> If not, I'd like to clearly indicate who can approve patches
> to lin-lwp.c.
>
> It's more who ought to than who can. I think any of you, me,
> Mark, or Jim Blandy (and maybe we ought to add Jeff Johnston)
> are qualified to approve them, but I don't know which one or
> two persons understand it fully enough to be called on as a
> maintainer. Jim and I, for instance, worked on it a long time
> ago.
>
> Part of the problem, I think, is that nobody really wants it.
> It's complicated, difficult, and fragile.
The general trend for such code to not have an explicit maintainer.
Instead changes get approved using peer-review that involves at least
one core maintainer. Anything architectural being pulled out and
discssed separatly.
I should also red flag that changing the target vector means changing
the thread code so "it could be fun times".
enjoy,
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: RFC: patch to lin-lwp.c
2003-08-06 17:11 ` J. Johnston
2003-10-04 21:41 ` Daniel Jacobowitz
@ 2003-10-08 18:00 ` Daniel Jacobowitz
2003-10-08 20:07 ` J. Johnston
1 sibling, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2003-10-08 18:00 UTC (permalink / raw)
To: J. Johnston; +Cc: gdb-patches
On Wed, Aug 06, 2003 at 01:11:09PM -0400, J. Johnston wrote:
> Sorry, forgot to attach patch.
>
> J. Johnston wrote:
> >The attached patch is created to deal with the problem as discussed on:
> >
> > http://sources.redhat.com/ml/gdb/2003-08/msg00043.html
> >
> >The fix does two things:
> >
> > 1. it sets the resumed flag for threads we stopped when the main thread
> > exited and then resumed
> > 2. changes the running_callback to include threads that have events
> > pending on them that will be caught on the next wait
> >
> >Ok to commit?
> >
> >-- Jeff J.
> >
> >2003-08-05 Jeff Johnston <jjohnstn@redhat.com>
> >
> > * lin-lwp-wait.c (stop_and_resume_callback): Set the resumed flag
> > for any lwp we resume.
> > (running_callback): Add lwps that have pending status events
> > against them to be considered running.
> >
> >
> >
This patch is OK. Thanks!
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: RFC: patch to lin-lwp.c
2003-10-08 18:00 ` Daniel Jacobowitz
@ 2003-10-08 20:07 ` J. Johnston
0 siblings, 0 replies; 7+ messages in thread
From: J. Johnston @ 2003-10-08 20:07 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
Ok, patch has been checked into mainline. If it is supposed to also be
in gdb 6.0, let me know.
I fixed the typo in the ChangeLog entry with regards to the file name being changed.
-- Jeff J.
Daniel Jacobowitz wrote:
> On Wed, Aug 06, 2003 at 01:11:09PM -0400, J. Johnston wrote:
>
>>Sorry, forgot to attach patch.
>>
>>J. Johnston wrote:
>>
>>>The attached patch is created to deal with the problem as discussed on:
>>>
>>> http://sources.redhat.com/ml/gdb/2003-08/msg00043.html
>>>
>>>The fix does two things:
>>>
>>> 1. it sets the resumed flag for threads we stopped when the main thread
>>> exited and then resumed
>>> 2. changes the running_callback to include threads that have events
>>> pending on them that will be caught on the next wait
>>>
>>>Ok to commit?
>>>
>>>-- Jeff J.
>>>
>>>2003-08-05 Jeff Johnston <jjohnstn@redhat.com>
>>>
>>> * lin-lwp-wait.c (stop_and_resume_callback): Set the resumed flag
>>> for any lwp we resume.
>>> (running_callback): Add lwps that have pending status events
>>> against them to be considered running.
>>>
>>>
>>>
>
>
> This patch is OK. Thanks!
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-10-08 20:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-05 23:22 RFC: patch to lin-lwp.c J. Johnston
2003-08-06 17:11 ` J. Johnston
2003-10-04 21:41 ` Daniel Jacobowitz
2003-10-08 0:19 ` Michael Snyder
2003-10-08 17:57 ` Andrew Cagney
2003-10-08 18:00 ` Daniel Jacobowitz
2003-10-08 20:07 ` J. Johnston
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox