Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH] Remove get_thread_id
Date: Tue, 04 Aug 2015 21:57:00 -0000	[thread overview]
Message-ID: <20150804145710.6960cec1@pinnacle.lan> (raw)
In-Reply-To: <20150804173043.GK4777@adacore.com>

On Tue, 4 Aug 2015 10:30:43 -0700
Joel Brobecker <brobecker@adacore.com> wrote:

> > This patch removes get_thread_id from aarch64-linux-nat.c,
> > arm-linux-nat.c and xtensa-linux-nat.c.
> > 
> > get_thread_id was added in this commit below in 2000,
> > 
> >   41c49b06c471443d3baf2eaa2463a315f9b5edca
> >   https://sourceware.org/ml/gdb-patches/2000-04/msg00398.html
> > 
> > which predates the ptid_t stuff added into GDB.  Nowadays, lwpid of
> > inferior_ptid is only zero when the inferior is created (in
> > fork-child.c:fork_inferior) and its lwpid will be set after
> > linux_nat_wait_1 gets the first event.  After that, lwpid of
> > inferior_ptid is not zero for linux-nat target, then we can use
> > ptid_get_lwp, so this function isn't needed anymore.
> 
> I'm not a specialist, but I tend to agree. I've always found
> these GET_THREAD_ID macros, in particular, but be unecessary
> and obfuscating.

Yao's patch looks good to me too.

Kevin


  reply	other threads:[~2015-08-04 21:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30 12:52 Yao Qi
2015-08-04 17:30 ` Joel Brobecker
2015-08-04 21:57   ` Kevin Buettner [this message]
2015-08-05  7:42     ` Yao Qi

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=20150804145710.6960cec1@pinnacle.lan \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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