Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFC: make thread_list static
Date: Wed, 28 Nov 2012 07:27:00 -0000	[thread overview]
Message-ID: <20121128072716.GC3581@adacore.com> (raw)
In-Reply-To: <87y5hmdhl0.fsf@fleche.redhat.com>

On Tue, Nov 27, 2012 at 11:30:19AM -0700, Tom Tromey wrote:
> I've had this patch on a branch for a while and thought I would send it
> today.
> 
> I noticed that thread_list is only used in one place outside of
> thread.c.  It seems generally preferable to me to keep things like this
> private.  So, this patch makes it static and updates the one user.
> 
> Bootstrapped and regtested on x86-64 Fedora 16.
> 
> Let me know what you think.

I like it! I think it's a good idea to shield these globals, and
the use of iterate_over_threads isn't making the code that worse.
We're using these kinds of iterators all over the code, so it should
have a familiar feel.

> 2012-11-27  Tom Tromey  <tromey@redhat.com>
> 
> 	* thread.c (thread_list): Now static.
> 	* remote.c (struct pending_resumption_data): New.
> 	(pending_thread_callback): New function.
> 	(append_pending_thread_resumptions): Use iterate_over_threads.
> 	* gdbthread.h (ALL_THREADS): Remove.
> 	(thread_list): Don't declare.

-- 
Joel


  reply	other threads:[~2012-11-28  7:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27 18:30 Tom Tromey
2012-11-28  7:27 ` Joel Brobecker [this message]
2012-11-28  8:41 ` Yao Qi
2012-11-28  9:27 ` Pedro Alves
2012-11-28 14:35   ` Tom Tromey

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=20121128072716.GC3581@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@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