aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/htl
diff options
context:
space:
mode:
authorgfleury <gfleury@disroot.org>2025-02-09 22:01:06 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-02-10 01:39:17 +0100
commit2789003489c93305ecdc9f27d583507e07886631 (patch)
tree187fe5371fc8f29a5ae6489920eeca15d90aefaa /sysdeps/htl
parent735c9b73d6182f2fa9b72f708bd1f651b7c2717b (diff)
downloadglibc-2789003489c93305ecdc9f27d583507e07886631.tar.xz
glibc-2789003489c93305ecdc9f27d583507e07886631.zip
htl: move pthread_barrier_init into libc.
Message-ID: <20250209200108.865599-7-gfleury@disroot.org>
Diffstat (limited to 'sysdeps/htl')
-rw-r--r--sysdeps/htl/pt-barrier-init.c10
-rw-r--r--sysdeps/htl/pthreadP.h4
2 files changed, 12 insertions, 2 deletions
diff --git a/sysdeps/htl/pt-barrier-init.c b/sysdeps/htl/pt-barrier-init.c
index 4854f7c183..0fc77c26eb 100644
--- a/sysdeps/htl/pt-barrier-init.c
+++ b/sysdeps/htl/pt-barrier-init.c
@@ -19,11 +19,11 @@
#include <pthread.h>
#include <string.h>
#include <assert.h>
-
+#include <shlib-compat.h>
#include <pt-internal.h>
int
-pthread_barrier_init (pthread_barrier_t *barrier,
+__pthread_barrier_init (pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr, unsigned count)
{
ASSERT_TYPE_SIZE (pthread_barrier_t, __SIZEOF_PTHREAD_BARRIER_T);
@@ -51,3 +51,9 @@ pthread_barrier_init (pthread_barrier_t *barrier,
*barrier->__attr = *attr;
return 0;
}
+libc_hidden_def (__pthread_barrier_init)
+versioned_symbol (libc, __pthread_barrier_init, pthread_barrier_init, GLIBC_2_42);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42)
+compat_symbol (libpthread, __pthread_barrier_init, pthread_barrier_init, GLIBC_2_12);
+#endif
diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h
index 548adbe4af..cb28124443 100644
--- a/sysdeps/htl/pthreadP.h
+++ b/sysdeps/htl/pthreadP.h
@@ -33,6 +33,10 @@ extern void __pthread_init_static_tls (struct link_map *) attribute_hidden;
extern int __pthread_barrier_destroy (pthread_barrier_t *__barrier);
libc_hidden_proto (__pthread_barrier_destroy)
+extern int __pthread_barrier_init (pthread_barrier_t *__barrier,
+ const pthread_barrierattr_t *__attr,
+ unsigned __count);
+libc_hidden_proto (__pthread_barrier_init)
extern int __pthread_barrierattr_destroy (pthread_barrierattr_t *__attr);
libc_hidden_proto (__pthread_barrierattr_destroy)
extern int __pthread_barrierattr_getpshared (const pthread_barrierattr_t *__attr,