[PATCH] nptl: Add pthread_thread_number_np function
Florian Weimer
fweimer@redhat.com
Fri Mar 9 17:23:00 GMT 2018
On 03/02/2018 07:08 PM, Rich Felker wrote:
> Further, making it lazy also improves the latter aspect if you're
> unwilling to make a dedicated "failure" value. "Libc has to abort if
> you ever create more than 2^64 threads" is an awful constraint to be
> tied to. "Libc aborts if you ever call this random nonstandard
> function from more than 2^64 unique threads" seems tolerable since the
> simple mitigation is "don't use that function".
Currently glibc policy is to assume that 2**60 counters never overflow
(without any checks). We have functionality which underwent extensive
peer review with this property.
However, I will come up with something else since there appears to be a
strong dislike for this interface.
Thanks,
Florian
More information about the Libc-alpha
mailing list