aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorgfleury <gfleury@disroot.org>2024-12-19 22:37:20 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-12-22 23:34:27 +0100
commit8735ea79ab22cad3bd975b507fd6ca4b37094bb8 (patch)
treee8da52c53c7dd0ac6a8e643c99d4a9381d3d47c8 /sysdeps
parentfd30525eadff6a4b2ac9478bdd6490d0c9c116d9 (diff)
downloadglibc-8735ea79ab22cad3bd975b507fd6ca4b37094bb8.zip
glibc-8735ea79ab22cad3bd975b507fd6ca4b37094bb8.tar.gz
glibc-8735ea79ab22cad3bd975b507fd6ca4b37094bb8.tar.bz2
htl: move pthread_cond_init into libc.
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241219203727.669825-2-gfleury@disroot.org>
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/htl/pt-cond-init.c8
-rw-r--r--sysdeps/htl/pthread-functions.h4
-rw-r--r--sysdeps/htl/pthreadP.h1
-rw-r--r--sysdeps/htl/timer_routines.c2
-rw-r--r--sysdeps/mach/hurd/i386/libc.abilist1
-rw-r--r--sysdeps/mach/hurd/i386/libpthread.abilist1
-rw-r--r--sysdeps/mach/hurd/x86_64/libpthread.abilist1
7 files changed, 9 insertions, 9 deletions
diff --git a/sysdeps/htl/pt-cond-init.c b/sysdeps/htl/pt-cond-init.c
index 463e42c..73ca94e 100644
--- a/sysdeps/htl/pt-cond-init.c
+++ b/sysdeps/htl/pt-cond-init.c
@@ -19,7 +19,7 @@
#include <pthread.h>
#include <assert.h>
#include <string.h>
-
+#include <shlib-compat.h>
#include <pt-internal.h>
int
@@ -43,5 +43,9 @@ __pthread_cond_init (pthread_cond_t *cond, const pthread_condattr_t * attr)
*cond->__attr = *attr;
return 0;
}
+libc_hidden_def (__pthread_cond_init)
+versioned_symbol (libc, __pthread_cond_init, pthread_cond_init, GLIBC_2_21);
-weak_alias (__pthread_cond_init, pthread_cond_init);
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
+compat_symbol (libc, __pthread_cond_init, pthread_cond_init, GLIBC_2_12);
+#endif
diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h
index 8ee01d3..87e75ca 100644
--- a/sysdeps/htl/pthread-functions.h
+++ b/sysdeps/htl/pthread-functions.h
@@ -23,8 +23,6 @@
int __pthread_cond_broadcast (pthread_cond_t *);
int __pthread_cond_destroy (pthread_cond_t *);
-int __pthread_cond_init (pthread_cond_t *,
- const pthread_condattr_t *);
int __pthread_cond_signal (pthread_cond_t *);
int __pthread_cond_wait (pthread_cond_t *, pthread_mutex_t *);
int __pthread_cond_timedwait (pthread_cond_t *, pthread_mutex_t *,
@@ -58,8 +56,6 @@ struct pthread_functions
{
int (*ptr_pthread_cond_broadcast) (pthread_cond_t *);
int (*ptr_pthread_cond_destroy) (pthread_cond_t *);
- int (*ptr_pthread_cond_init) (pthread_cond_t *,
- const pthread_condattr_t *);
int (*ptr_pthread_cond_signal) (pthread_cond_t *);
int (*ptr_pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *);
int (*ptr_pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *,
diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h
index adb81bc..64c8662 100644
--- a/sysdeps/htl/pthreadP.h
+++ b/sysdeps/htl/pthreadP.h
@@ -43,6 +43,7 @@ extern int __pthread_mutexattr_settype (pthread_mutexattr_t *attr, int kind);
extern int __pthread_cond_init (pthread_cond_t *cond,
const pthread_condattr_t *cond_attr);
+libc_hidden_proto (__pthread_cond_init)
extern int __pthread_cond_signal (pthread_cond_t *cond);
extern int __pthread_cond_broadcast (pthread_cond_t *cond);
extern int __pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex);
diff --git a/sysdeps/htl/timer_routines.c b/sysdeps/htl/timer_routines.c
index 3a63de6..0992ea3 100644
--- a/sysdeps/htl/timer_routines.c
+++ b/sysdeps/htl/timer_routines.c
@@ -151,7 +151,7 @@ thread_init (struct thread_node *thread, const pthread_attr_t *attr, clockid_t c
thread->exists = 0;
INIT_LIST_HEAD (&thread->timer_queue);
- pthread_cond_init (&thread->cond, 0);
+ __pthread_cond_init (&thread->cond, 0);
thread->current_timer = 0;
thread->captured = pthread_self ();
thread->clock_id = clock_id;
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index f4613aa..d5520a0 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -49,6 +49,7 @@ GLIBC_2.12 pthread_attr_setscope F
GLIBC_2.12 pthread_attr_setstack F
GLIBC_2.12 pthread_attr_setstackaddr F
GLIBC_2.12 pthread_attr_setstacksize F
+GLIBC_2.12 pthread_cond_init F
GLIBC_2.12 pthread_condattr_destroy F
GLIBC_2.12 pthread_condattr_getclock F
GLIBC_2.12 pthread_condattr_getpshared F
diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist
index e5b3edb..77eddcf 100644
--- a/sysdeps/mach/hurd/i386/libpthread.abilist
+++ b/sysdeps/mach/hurd/i386/libpthread.abilist
@@ -32,7 +32,6 @@ GLIBC_2.12 pthread_barrierattr_setpshared F
GLIBC_2.12 pthread_cancel F
GLIBC_2.12 pthread_cond_broadcast F
GLIBC_2.12 pthread_cond_destroy F
-GLIBC_2.12 pthread_cond_init F
GLIBC_2.12 pthread_cond_signal F
GLIBC_2.12 pthread_cond_timedwait F
GLIBC_2.12 pthread_cond_wait F
diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist
index 89a6304..25bcc9d 100644
--- a/sysdeps/mach/hurd/x86_64/libpthread.abilist
+++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist
@@ -51,7 +51,6 @@ GLIBC_2.38 pthread_clockjoin_np F
GLIBC_2.38 pthread_cond_broadcast F
GLIBC_2.38 pthread_cond_clockwait F
GLIBC_2.38 pthread_cond_destroy F
-GLIBC_2.38 pthread_cond_init F
GLIBC_2.38 pthread_cond_signal F
GLIBC_2.38 pthread_cond_timedwait F
GLIBC_2.38 pthread_cond_wait F