[PATCH 12/23] nptl: Introduce __nptl_deferred_init

Carlos O'Donell carlos@redhat.com
Sat May 15 02:02:58 GMT 2021


On 5/14/21 3:27 PM, Florian Weimer wrote:
> * Carlos O'Donell:
> 
>>> We don't really need in fact, pthread_cancel can call __pthread_exit
>>> directly if the argument is THREAD_SELF. And with my canceltype and
>>> cancelstate refactor we don't even need the whole atomic bit set
>>> support.
>>
>> And POSIX in the RATIONALE says exactly this:
>> ~~~
>> The special function also means that implementations are not obliged
>> to implement cancellation with signals.
>> ~~~
>> https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_cancel.html
> 
> My question was whether we use the signal mask to block cancellation,
> but I don't think that's the case (except in some cases where we block
> *all* signals for other reasons).
> 
> But calling pthread_exit is probably not the right thing to do because
> pthread_cancel is itself not a cancellation point.
> 
> In any case, I really don't want to change the implementation as part of
> this series.

I agree that not changing things during a refactor is an important
part of avoiding regression.

Adhemerval, Do we agree that this can be changed later?

-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list