[PATCH] nptl: Add smoke test for pthread_getcpuclockid failure

Florian Weimer fweimer@redhat.com
Fri Nov 22 11:53:32 GMT 2024


* Siddhesh Poyarekar:

> On 2024-11-22 06:43, Florian Weimer wrote:
>>> I can't see a way to intercept points within the lifetime of the
>>> thread id where tid is <=0, but I'll send an update if I do.
>> You could avoid joining the thread t and loop until
>> pthread_getcpuclockid fails, and then check that the error is ESRCH.
>
> That would mean considering a timeout as success as well, wouldn't it?
> Or put in an upper limit to iterations.

I believe the kernel will reset the TID to zero once the thread exits.

Thanks,
Florian



More information about the Libc-alpha mailing list