This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] nptl: Add pthread_thread_number_np function
On 12/20/2017 06:34 AM, Florian Weimer wrote:
>> The design of the pthread_thread_number_np API immediately limits the
>> number of creatable threads to the size of the return type. If we allow
>> creating more threads than that then we break the API.
>
>> My objection is not with the internal implementation of a 64-bit counter.
>>
>> My objection is to the external exposing of a limit on number of threads.
>
> Well, the counterargument is that 2**64 is so large that by the time
> we have such machines which create as many threads within the
> life-time of a single process, we will have a new ABI (for off128_t)
> and can switch the return value to uint128_t.
OK, so you argue that the uint64_t is temporary, and we will provide
larger types as the computing infrastructure changes, with the ability
to handle more unique thread creation events in the future?
I am happier with this line of reasoning. Let me review the patch again
with this in mind and make some suggestions.
--
Cheers,
Carlos.