Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "J. Johnston" <jjohnstn@redhat.com>
To: "J. Johnston" <jjohnstn@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFC: patch to lin-lwp.c
Date: Wed, 06 Aug 2003 17:11:00 -0000	[thread overview]
Message-ID: <3F3136AD.4010300@redhat.com> (raw)
In-Reply-To: <3F303C1E.7040304@redhat.com>

[-- 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;
 }

  reply	other threads:[~2003-08-06 17:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-05 23:22 J. Johnston
2003-08-06 17:11 ` J. Johnston [this message]
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

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=3F3136AD.4010300@redhat.com \
    --to=jjohnstn@redhat.com \
    --cc=gdb-patches@sources.redhat.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