Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Kevin Buettner <kevinb@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH RFC] process/thread/lwp id patch - phase 1
Date: Thu, 03 May 2001 15:57:00 -0000	[thread overview]
Message-ID: <3AF1E24D.9080306@cygnus.com> (raw)
In-Reply-To: <1010430174514.ZM31129@ocotillo.lan>

>  * defs.h (ptid_t): New typedef.

More of an observation than a comment.  GDB doesn't have a policy on how 
to name what I think have become known as ``light weight types'' along 
iwth other typedefs.  As it is we have

	xxx_ftype
	xxx_func
		I've recently tried to encourage
		just *_ftype over _func but largely
		for arbitrary reasons.
	LONGEST
	DOUBLEST
		I suspect these were originally
		macros.
	serial_t
	value_ptr
		these may be replaced with
		``struct xxxx *''
	PTR	
		being replaced with ``void *''.

and so on.

Given this, randomness, someone might someday make it all consistent. 
However, until that day, as kevin, noted we can probably live with 
foo_t.  Besides, having a type and using it consistently is more 
important than the name.


In terms of direction, I would expect tpid_t to eventually just be 
treated like a KEY that is used to locate the corresponding ``struct 
thread_info *'' object.  It is a key because GDB retains it for longer 
than the lifetime of the corresponding thread_info object.

With this in mind:

>  - This patch introduces some new macros, pid_to_ptid, null_ptid,
>       minus_one_ptid, and ptid_equal.  These macros will be eliminated
>       in phase 3.  In their place will be functions (for pid_to_ptid
>       and ptid_equal) and variables (for null_ptid and minus_one_ptid).
>       Other ptid accessors an a ptid constructor will be introduced at
>       the same time.

is ptid_equal() needed?  Won't memcmp() be sufficient?

	Andrew


  parent reply	other threads:[~2001-05-03 15:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-30 10:45 Kevin Buettner
2001-05-01  1:48 ` Eli Zaretskii
2001-05-01  7:47   ` Kevin Buettner
2001-05-03  0:19     ` Eli Zaretskii
2001-05-03  1:24       ` Kevin Buettner
2001-05-03  1:28         ` Eli Zaretskii
2001-05-03 15:57 ` Andrew Cagney [this message]
2001-05-03 21:31 ` Kevin Buettner

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=3AF1E24D.9080306@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kevinb@cygnus.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