[Python-Dev] pthreads question: typedef ??? pthread_t and hacky return statements

Tim Peters tim_one@email.msn.com
Fri, 18 Aug 2000 15:26:31 -0400


[Mark Favas]
> return (long) threadid;
>
> compiles without warnings, and all tests pass on OSF/1 (aka Tru64 Unix).
> Removing the "volatile" is also fine for me, but may affect Vladimir.
> I'm still a bit (ha!) confused by Tim's comments that the function is
> bogus for OSF/1 because it throws away half the bits, and will therefore
> result in id collisions - this will only happen on platforms where
> sizeof(long) is less than sizeof(pointer), which is not OSF/1

Pure guess on my part -- couldn't imagine why a compiler would warn *unless*
bits were being lost.  Are you running this on an Alpha?  The comment in the
code specifically names "Alpha OSF/1" as the culprit.  I don't know anything
about OSF/1; perhaps "Alpha" is implied.

> ...
> In summary, whatever issue there was for OSF/1 six (or so) years ago
> appears to be no longer relevant - but there will be the truncation
> issue for Win64-like platforms.

And there's Vladimir's "volatile" hack.