[PATCH 0/1] htl: move pthread_spin_*

Samuel Thibault samuel.thibault@aquilenet.fr
Wed Nov 19 18:55:53 GMT 2025


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.

> - 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


More information about the Libc-alpha mailing list