]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
common/ptid.h: Mention that process_stratum targets should prefer ptid.lwp.
authorPedro Alves <palves@redhat.com>
Wed, 19 Feb 2014 18:25:41 +0000 (18:25 +0000)
committerPedro Alves <palves@redhat.com>
Wed, 19 Feb 2014 18:27:01 +0000 (18:27 +0000)
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.  This patch adds a comment in that direction to struct ptid's
definition.

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

* common/ptid.h (struct ptid): Mention that process_stratum
targets should prefer ptid.lwp.

gdb/ChangeLog
gdb/common/ptid.h

index 122288dbf7d6a52ff27720ec206a039315d89891..f8779b08f6b730c439926ea3ca94dd5d8f825395 100644 (file)
@@ -1,3 +1,8 @@
+2014-02-19  Pedro Alves  <palves@redhat.com>
+
+       * common/ptid.h (struct ptid): Mention that process_stratum
+       targets should prefer ptid.lwp.
+
 2014-02-19  Pedro Alves  <palves@redhat.com>
 
        * remote.c (remote_thread_alive, write_ptid, read_ptid)
index 362882dfa3e1d86fe0ff44208409e22168fbe38b..cc1825e9bef46c35ea4f354d4352311c735f99f6 100644 (file)
    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
 {