[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: invalid pthread_t value?
From: |
Neal H. Walfield |
Subject: |
Re: invalid pthread_t value? |
Date: |
Sun, 23 Dec 2007 11:05:58 +0100 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/21.4 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI) |
At Sat, 22 Dec 2007 23:15:58 +0100,
Samuel Thibault wrote:
> The NSPR needs an invalid value for pthread_t, which the Hurd doesn't
> officially have. I had proposed them to use -1 (since that would mean
> that there are something like 2^32 threads running, which just can't
> be...), but they don't seem to have accepted this (the patch seems to
> have been turned into a #error instead... No actual mail feedback).
>
> Since pthread_t is typedefed to int, maybe we can define
> PTHREAD_THREADS_MAX to INT_MAX to actually set an official limit (that
> limit exists anyway since above INT_MAX the comparisons in libpthread
> become bogus), and then tell them they can really use -1?
The implementation never returns a TID with a value of 0. Is this
sufficient? Or do you need the implementation to somehow reject this
invalid value?
Neal