[PATCH] Add the __libc_single_threaded variable
Szabolcs Nagy
Szabolcs.Nagy@arm.com
Fri Oct 4 10:14:00 GMT 2019
On 04/10/2019 10:59, Florian Weimer wrote:
> * Florian Weimer:
>
>> This version is based on the earlier feedback that a simple global
>> variable should be used instead
>>
>> <https://sourceware.org/ml/libc-alpha/2019-02/msg00073.html>
>>
>> and the benchmarking results suggesting that this is feasible:
>>
>> <https://sourceware.org/ml/libc-alpha/2019-06/msg00954.html>
>>
>> The implementation is somewhat complicated by copy relocations, which
>> are not applied to the inner namespace.
>>
>> This is probably the simplest possible implementation. It does not
>> attempt to reset the variable if there is only one thread left.
>
> I'm going to post an implementation based on the early-init work for the
> rseq addition. This way, we can keep the variable in libc.so instead of
> the loader, which is somewhat cleaner conceptually.
thanks for working on this.
(recently there was another gcc bugreport about gthr
weakrefs with static linking breaking libgcc_eh on
*-linux-musl, __libc_single_thread can solve that)
More information about the Libc-alpha
mailing list