[PATCH v3 24/37] nptl: Move pthread_key_create, __pthread_key_create into libc
Adhemerval Zanella
adhemerval.zanella@linaro.org
Wed Mar 24 14:42:05 GMT 2021
On 24/03/2021 11:32, Florian Weimer wrote:
> * Adhemerval Zanella:
>
>>> @@ -86,7 +88,9 @@ libc {
>>> }
>>> GLIBC_2.34 {
>>> __pthread_cleanup_routine;
>>> + __pthread_key_create;
>>> __pthread_once;
>>> + pthread_key_create;
>>> pthread_mutex_consistent;
>>> pthread_once;
>>> }
>>
>> Why do we need a __pthread_key_create for 2.34?
>
> __pthread_key_create is used by libstdc++.
Sigh... the description at libgcc/gthr-posix.h is *really* hacky and I
think we provide the __libc_single_threaded exactly to avoid keep
providing this kind of interfaces.
>
>>> @@ -47,5 +47,18 @@ __pthread_key_create (pthread_key_t *key, void (*destr) (void *))
>>>
>>> return EAGAIN;
>>> }
>>> -weak_alias (__pthread_key_create, pthread_key_create)
>>> -hidden_def (__pthread_key_create)
>>> +versioned_symbol (libc, __pthread_key_create_1, __pthread_key_create,
>>> + GLIBC_2_34);
>>> +libc_hidden_ver (__pthread_key_create_1, __pthread_key_create)
>>> +
>>> +/* Several aliases for setting different symbol versions. */
>>> +strong_alias (__pthread_key_create_1, __pthread_key_create_2)
>>> +strong_alias (__pthread_key_create_1, __pthread_key_create_3)
>>> +strong_alias (__pthread_key_create_1, __pthread_key_create_4)
>>> +
>>> +versioned_symbol (libc, __pthread_key_create_2, pthread_key_create,
>>> + GLIBC_2_34);
>>> +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_34)
>>> +compat_symbol (libc, __pthread_key_create_3, __pthread_key_create, GLIBC_2_0);
>>> +compat_symbol (libc, __pthread_key_create_4, pthread_key_create, GLIBC_2_0);
>>> +#endif
>>
>> I think you might want to revise it once compat_symbol has support
>> for multiple targets.
>
> Right that, applies in other places throughout the series, too.
>
> Speaking of which, should I repost the compat_symbol patches?
Isn't the one in patchwork the latest [1]?
[1] https://patchwork.sourceware.org/project/glibc/patch/07c2defd7f03c5f2493a4132de673f33457d7806.1616184336.git.fweimer@redhat.com/
More information about the Libc-alpha
mailing list