Re: deal thread id as unsigned

Mark Kettenis
2007-04-16T14:10:54Z

> 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.

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.

Mark