From: Yoriko Komatsuzaki <yoriko@sm.sony.co.jp>
To: Daniel Jacobowitz <drow@false.org>,
Mark Kettenis <mark.kettenis@xs4all.nl>,
gdb-patches@sourceware.org
Subject: Re: deal thread id as unsigned
Date: Tue, 17 Apr 2007 14:50:00 -0000 [thread overview]
Message-ID: <20070417105103.CC6E.YORIKO@sm.sony.co.jp> (raw)
In-Reply-To: <20070416141858.GA3844@caradoc.them.org>
Thank you for your reply and suggestion.
I get my mind around no modification of defs.h because of the care for other
os'es.
Concerning to thread id printing, I would appreciate it if you could
consider to print it by hexadecimal notation.
Thank you.
---
Yoriko Komatsuzaki
yoriko@sm.sony.co.jp
>> This suggests that
>> it should really be printed as an (unsigned) hexadecimal number.
>> Doing so doesn't need any changes to defs.h and therefore wouldn't
>> affect any other platforms at all.
> On Mon, Apr 16, 2007 at 04:10:27PM +0200, Mark Kettenis wrote:
> > > Date: Mon, 16 Apr 2007 11:39:55 +0900
> > > From: Yoriko Komatsuzaki <yoriko@sm.sony.co.jp>
> > >
> > > Hello.
> > >
> > > I would like to ask you to consider this tiny patch about thread id type.
> > > Thread id is unsigned type in Linux.
> >
> > I believe it used to be a signed type in Linux. Anyway, you can't
> > really change it, since on other OS'es the type defenitely is signed.
>
> Well, it used to be an int, but it would never be negative (always
> small and positive).
>
> > You'll only really notice this when the msb is set anyway. I think
> > this happens on the Linux threads implementation of today the thread
> > id isn't an integer at all, but a pointer instead. This suggests that
> > it should really be printed as an (unsigned) hexadecimal number.
> > Doing so doesn't need any changes to defs.h and therefore wouldn't
> > affect any other platforms at all.
>
> Right. I think printing it as hex is fine even for LinuxThreads,
> where 0x4000 is not substantially less clear than "16384" (which was
> always the thread ID of the first thread, no relation to PIDs).
>
> --
> Daniel Jacobowitz
> CodeSourcery
next prev parent reply other threads:[~2007-04-17 2:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-16 12:02 Yoriko Komatsuzaki
2007-04-16 14:19 ` Mark Kettenis
2007-04-16 15:14 ` Daniel Jacobowitz
2007-04-17 14:50 ` Yoriko Komatsuzaki [this message]
2007-05-14 16:53 ` Daniel Jacobowitz
2007-05-14 16:56 ` Daniel Jacobowitz
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=20070417105103.CC6E.YORIKO@sm.sony.co.jp \
--to=yoriko@sm.sony.co.jp \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/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