aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-06 15:56:37 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-06 15:56:37 +0200
commitf1af331c4e87dee7d91e404b9f746c99ca3f2c71 (patch)
treeef6ff8254bf6fbed0f2a9132abc66b996197f4ef /nptl
parent43b3746aff2f20c5865f559a76896fc6b131c09c (diff)
downloadglibc-f1af331c4e87dee7d91e404b9f746c99ca3f2c71.tar
glibc-f1af331c4e87dee7d91e404b9f746c99ca3f2c71.tar.gz
glibc-f1af331c4e87dee7d91e404b9f746c99ca3f2c71.tar.bz2
glibc-f1af331c4e87dee7d91e404b9f746c99ca3f2c71.zip
nptl: Move pthread_barrier_init into libc
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/Versions5
-rw-r--r--nptl/pthread_barrier_init.c15
3 files changed, 16 insertions, 6 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index f9cb1e2b99..54cf04b03a 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 b7a08a56a7..4716c3f693 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 b14243e618..3a13d2a756 100644
--- a/nptl/pthread_barrier_init.c
+++ b/nptl/pthread_barrier_init.c
@@ -20,7 +20,7 @@
#include "pthreadP.h"
#include <futex-internal.h>
#include <kernel-features.h>
-
+#include <shlib-compat.h>
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