Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Kevin Pouget <kevin.pouget@gmail.com>
Subject: Re: [PATCH] GDB checkpoint can't/shouldn't be possible with multiple threads on Linux
Date: Tue, 12 Apr 2011 13:42:00 -0000	[thread overview]
Message-ID: <201104121441.56034.pedro@codesourcery.com> (raw)
In-Reply-To: <BANLkTikFzxv7M3gnkw=RHEqL0QtzRysxiw@mail.gmail.com>

Small nit I should have caught before: 

On Tuesday 12 April 2011 14:27:49, Kevin Pouget wrote:
> +static int
> +inf_has_multiple_thread_cb (struct thread_info *tp, void *data)
> +{
> +  int *has_multiple_threads = (int *) data;

can you rename this local as well, in line with the other
local in the other function?  To "count", or "count_p", or something
like that.  Thanks.  (pre-approved)

> +  if (current_inferior ()->pid == ptid_get_pid (tp->ptid))
> +    (*has_multiple_threads)++;
> +
> +  /* Stop the iteration if multiple threads have been detected.  */
> +  return *has_multiple_threads > 1;
> +}
> +
> +/* Return true if the current inferior is multi-threaded.  */
> +
> +static int
> +inf_has_multiple_threads (void)
> +{
> +  int count = 0;
> +
> +  iterate_over_threads (inf_has_multiple_thread_cb, &count);


-- 
Pedro Alves


  parent reply	other threads:[~2011-04-12 13:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-12  7:44 Kevin Pouget
2011-04-12 10:59 ` Pedro Alves
2011-04-12 11:55   ` Kevin Pouget
2011-04-12 12:55     ` Pedro Alves
2011-04-12 13:28       ` Kevin Pouget
2011-04-12 13:36         ` Pedro Alves
2011-04-12 13:42         ` Pedro Alves [this message]
2011-04-12 13:55           ` Kevin Pouget
2011-08-31 12:45             ` Kevin Pouget
2011-09-06 14:42               ` Pedro Alves
2011-09-15 13:32                 ` Kevin Pouget

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=201104121441.56034.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevin.pouget@gmail.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