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

nptl: Move pthread_spin_init, Move pthread_spin_unlock into libc

For some architectures, the two functions are aliased, so these
symbols need to be moved at the same time.

The symbols were moved using scripts/move-symbol-to-libc.py.
This commit is contained in:
Florian Weimer
2021-04-22 15:18:12 +02:00
parent c7b1cd4ad1
commit ce4b3b7bef
73 changed files with 233 additions and 89 deletions

View File

@ -18,11 +18,17 @@
<https://www.gnu.org/licenses/>. */
#include "pthreadP.h"
#include <shlib-compat.h>
int
pthread_spin_init (pthread_spinlock_t *lock, int pshared)
__pthread_spin_init (pthread_spinlock_t *lock, int pshared)
{
/* Relaxed MO is fine because this is an initializing store. */
atomic_store_relaxed (lock, 0);
return 0;
}
versioned_symbol (libc, __pthread_spin_init, pthread_spin_init, GLIBC_2_34);
#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34)
compat_symbol (libpthread, __pthread_spin_init, pthread_spin_init, GLIBC_2_2);
#endif