[PATCH 0/1] htl: move pthread_spin_*

gfleury gfleury@disroot.org
Wed Nov 19 19:59:43 GMT 2025


Le 2025-11-19 20:55, Samuel Thibault a écrit :

> Hello,
> 
> Thanks!
> 
> gfleury, le mer. 19 nov. 2025 10:45:14 +0200, a ecrit:
> 
>> - Add __pthread_spin_* symbols to GLIBC_2.2.6 as suggested by make 
>> check elf/check-abi-libc. This mirrors their existing export in 
>> sysdeps/htl/Versions libc GLIBC_2.2 i guess.
> 
> Mmmm. These __ versions are not used at all outside libc.so actually. I
> believe we'd rather want to just stop exposing them at all.
> 
> And we'd rather remove sysdeps/mach/htl/bits/spin-lock-inline.h which
> nobody is using, and shouldn't anyway.
> 
> It is used in sysdeps/htl/include/pthread.h.
> which is them implementation of pthread_spin_*.
> 
> Show we move the defininition from 
> sysdeps/mach/htl/bits/spin-lock-inline.h to 
> sysdeps/htl/include/pthread.h
> or is there another way
> 
>> - In sysdeps/mach/htl/pt-spin.c, use lock-intern.h instead of 
>> machine-lock.h to eliminate an extra PLT reference to 
>> __spin_lock_solid.
> 
> Indeed, better directly inline the eventual version. But that being
> said, _pthread_spin_lock is not used either, better remove it as
> well. Yes, that removes sysdeps/mach/htl/pt-spin.c, that's fine.
> 
>> - Move sysdeps/i386/pthread_spin_trylock.S to sysdeps/i386/nptl/ to 
>> explicitly mark it as an NPTL-specific implementation.
> 
> Indeed!
> 
>> diff --git a/sysdeps/mach/x86/machine-lock.h 
>> b/sysdeps/mach/x86/machine-lock.h
>> index f27fc2f8..45f87f9b 100644
>> --- a/sysdeps/mach/x86/machine-lock.h
>> +++ b/sysdeps/mach/x86/machine-lock.h
>> @@ -51,6 +51,7 @@ __spin_unlock (__spin_lock_t *__lock)
>> 
>> extern int __spin_try_lock (__spin_lock_t *__lock);
>> 
>> +
>> #if defined __USE_EXTERN_INLINES && defined _LIBC
>> _EXTERN_INLINE int
>> __spin_try_lock (__spin_lock_t *__lock)
>> --
>> 2.52.0
> 
> Spurious change :)
> 
> Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20251119/53509676/attachment-0001.htm>


More information about the Libc-alpha mailing list