Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/2] common/ptid.h: Mention that process_stratum targets should prefer ptid.lwp.
Date: Wed, 12 Feb 2014 14:07:00 -0000	[thread overview]
Message-ID: <1392214020-21478-3-git-send-email-palves@redhat.com> (raw)
In-Reply-To: <1392214020-21478-1-git-send-email-palves@redhat.com>

It's best that we standardize on process_stratum targets using the
ptid.lwp field to store thread ids.  The idea being leave the ptid.tid
field free for any thread_stratum target that might want to sit on
top.

gdb/
2014-02-12  Pedro Alves  <palves@redhat.com>

	* common/ptid.h (struct ptid): Mention that process_stratum
	targets should prefer ptid.lwp.
---
 gdb/common/ptid.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/common/ptid.h b/gdb/common/ptid.h
index 362882d..cc1825e 100644
--- a/gdb/common/ptid.h
+++ b/gdb/common/ptid.h
@@ -25,7 +25,12 @@
    consists of the process id (pid), lightweight process id (lwp) and
    thread id (tid).  When manipulating ptids, the constructors,
    accessors, and predicates declared in this file should be used.  Do
-   NOT access the struct ptid members directly.  */
+   NOT access the struct ptid members directly.
+
+   process_stratum targets that handle threading themselves should
+   prefer using the ptid.lwp field, leaving the ptid.tid field for any
+   thread_stratum target that might want to sit on top.
+*/
 
 struct ptid
 {
-- 
1.7.11.7


  reply	other threads:[~2014-02-12 14:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 14:07 [PATCH 0/2] remote.c: ptid.tid -> ptid.lwp Pedro Alves
2014-02-12 14:07 ` Pedro Alves [this message]
2014-02-12 14:07 ` [PATCH 1/2] remote.c: Use the ptid.lwp field to store remote thread ids rather than ptid.tid Pedro Alves
2014-02-12 16:56   ` Tom Tromey
2014-02-12 16:58     ` Pedro Alves
2014-02-12 18:09   ` Doug Evans
2014-02-19 19:09 ` [PATCH 0/2] remote.c: ptid.tid -> ptid.lwp Pedro Alves

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=1392214020-21478-3-git-send-email-palves@redhat.com \
    --to=palves@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