From f1af331c4e87dee7d91e404b9f746c99ca3f2c71 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 6 May 2021 15:56:37 +0200 Subject: nptl: Move pthread_barrier_init into libc The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella --- nptl/Makefile | 2 +- nptl/Versions | 5 +++-- nptl/pthread_barrier_init.c | 15 ++++++++++++--- 3 files changed, 16 insertions(+), 6 deletions(-) (limited to 'nptl') diff --git a/nptl/Makefile b/nptl/Makefile index f9cb1e2..54cf04b 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -74,6 +74,7 @@ routines = \ pthread_attr_setsigmask \ pthread_attr_setsigmask_internal \ pthread_barrier_destroy \ + pthread_barrier_init \ pthread_cleanup_upto \ pthread_cond_broadcast \ pthread_cond_destroy \ @@ -188,7 +189,6 @@ libpthread-routines = \ pthread_attr_setstack \ pthread_attr_setstackaddr \ pthread_attr_setstacksize \ - pthread_barrier_init \ pthread_barrier_wait \ pthread_barrierattr_destroy \ pthread_barrierattr_getpshared \ diff --git a/nptl/Versions b/nptl/Versions index b7a08a5..4716c3f 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -107,6 +107,7 @@ libc { __pthread_rwlock_unlock; __pthread_rwlock_wrlock; pthread_barrier_destroy; + pthread_barrier_init; pthread_condattr_getpshared; pthread_condattr_setpshared; pthread_mutex_timedlock; @@ -220,6 +221,7 @@ libc { mtx_trylock; mtx_unlock; pthread_barrier_destroy; + pthread_barrier_init; pthread_cond_clockwait; pthread_condattr_getclock; pthread_condattr_getpshared; @@ -309,6 +311,7 @@ libc { __pthread_attr_init; __pthread_attr_setaffinity_np; __pthread_attr_setsigmask_internal; + __pthread_barrier_init; __pthread_cleanup_pop; __pthread_cleanup_push; __pthread_cleanup_upto; @@ -369,7 +372,6 @@ libpthread { GLIBC_2.2 { pthread_attr_getstack; pthread_attr_setstack; - pthread_barrier_init; pthread_barrier_wait; pthread_barrierattr_destroy; pthread_barrierattr_init; @@ -446,7 +448,6 @@ libpthread { GLIBC_PRIVATE { __libpthread_freeres; - __pthread_barrier_init; __pthread_barrier_wait; __pthread_clock_gettime; __pthread_clock_settime; diff --git a/nptl/pthread_barrier_init.c b/nptl/pthread_barrier_init.c index b14243e..3a13d2a 100644 --- a/nptl/pthread_barrier_init.c +++ b/nptl/pthread_barrier_init.c @@ -20,7 +20,7 @@ #include "pthreadP.h" #include #include - +#include static const struct pthread_barrierattr default_barrierattr = { @@ -29,7 +29,7 @@ static const struct pthread_barrierattr default_barrierattr = int -__pthread_barrier_init (pthread_barrier_t *barrier, +___pthread_barrier_init (pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count) { ASSERT_TYPE_SIZE (pthread_barrier_t, __SIZEOF_PTHREAD_BARRIER_T); @@ -61,4 +61,13 @@ __pthread_barrier_init (pthread_barrier_t *barrier, return 0; } -weak_alias (__pthread_barrier_init, pthread_barrier_init) +versioned_symbol (libc, ___pthread_barrier_init, pthread_barrier_init, + GLIBC_2_34); +versioned_symbol (libc, ___pthread_barrier_init, __pthread_barrier_init, + GLIBC_PRIVATE); +libc_hidden_ver (___pthread_barrier_init, __pthread_barrier_init) + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34) +compat_symbol (libpthread, ___pthread_barrier_init, pthread_barrier_init, + GLIBC_2_2); +#endif -- cgit v1.1