1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

nptl: Move pthread_spin_trylock into libc

The symbol was moved using scripts/move-symbol-to-libc.py.
This commit is contained in:
Florian Weimer
2021-04-23 10:23:24 +02:00
parent da8e3710d8
commit 4baf02b332
72 changed files with 158 additions and 52 deletions

View File

@ -17,13 +17,21 @@
#include <sysdep.h>
#include <errno.h>
#include <shlib-compat.h>
.text
ENTRY(pthread_spin_trylock)
ENTRY(__pthread_spin_trylock)
ldstub [%o0], %o0
cmp %o0, 0
bne,a 1f
mov EBUSY, %o0
1: retl
nop
END(pthread_spin_trylock)
END(__pthread_spin_trylock)
versioned_symbol (libc, __pthread_spin_trylock, pthread_spin_trylock,
GLIBC_2_34)
#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34)
compat_symbol (libpthread, __pthread_spin_trylock, pthread_spin_trylock,
GLIBC_2_2)
#endif

View File

@ -17,11 +17,19 @@
#include <sysdep.h>
#include <errno.h>
#include <shlib-compat.h>
.text
ENTRY(pthread_spin_trylock)
ENTRY(__pthread_spin_trylock)
ldstub [%o0], %o0
membar #StoreLoad | #StoreStore
retl
movrnz %o0, EBUSY, %o0
END(pthread_spin_trylock)
END(__pthread_spin_trylock)
versioned_symbol (libc, __pthread_spin_trylock, pthread_spin_trylock,
GLIBC_2_34)
#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34)
compat_symbol (libpthread, __pthread_spin_trylock, pthread_spin_trylock,
GLIBC_2_2)
#endif