]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
htl: move pthread_cond_init into libc.
authorgfleury <gfleury@disroot.org>
Thu, 19 Dec 2024 20:37:20 +0000 (22:37 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 22 Dec 2024 22:34:27 +0000 (23:34 +0100)
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241219203727.669825-2-gfleury@disroot.org>

htl/Makefile
htl/Versions
htl/forward.c
htl/pt-initialize.c
sysdeps/htl/pt-cond-init.c
sysdeps/htl/pthread-functions.h
sysdeps/htl/pthreadP.h
sysdeps/htl/timer_routines.c
sysdeps/mach/hurd/i386/libc.abilist
sysdeps/mach/hurd/i386/libpthread.abilist
sysdeps/mach/hurd/x86_64/libpthread.abilist

index 7f40fd91bf77ca49709a3aca09073c1265a3e824..8dee043975df47ec55c487ea1552a68fc9598537 100644 (file)
@@ -92,7 +92,6 @@ libpthread-routines := \
   pt-rwlock-timedwrlock \
   pt-rwlock-unlock \
   pt-cond-destroy \
-  pt-cond-init \
   pt-cond-brdcast \
   pt-cond-signal \
   pt-cond-wait \
@@ -197,6 +196,7 @@ routines := \
   pt-attr-setstackaddr \
   pt-attr-setstacksize \
   pt-cond \
+  pt-cond-init \
   pt-condattr-destroy \
   pt-condattr-getclock \
   pt-condattr-getpshared \
index dd786f7947679c6f67774406bebb4525ce231a68..02d655d6bd946901d99b4f9bb247e3b370159172 100644 (file)
@@ -26,6 +26,7 @@ libc {
     pthread_attr_setscope;
     pthread_attr_setschedparam;
     pthread_attr_init;
+    pthread_cond_init;
     pthread_condattr_getclock;
     pthread_condattr_init;
     pthread_condattr_destroy;
@@ -94,6 +95,7 @@ libc {
     __pthread_attr_setstacksize;
     __pthread_attr_setstackaddr;
     __pthread_attr_setstack;
+    __pthread_cond_init;
     __pthread_condattr_init;
     __pthread_default_condattr;
     __pthread_sigstate;
@@ -133,7 +135,7 @@ libpthread {
 
     pthread_cancel;
 
-    pthread_cond_broadcast; pthread_cond_destroy; pthread_cond_init;
+    pthread_cond_broadcast; pthread_cond_destroy;
     pthread_cond_signal; pthread_cond_timedwait; pthread_cond_wait;
 
     pthread_create; pthread_detach; pthread_exit;
index 48825de0b03f3a50bd3fb9052547c93b64f962f8..eb83eaeda1ed4d89a6dc4cb56b75861a1c5a947c 100644 (file)
@@ -55,9 +55,6 @@ name decl                                                                   \
 
 FORWARD (pthread_cond_broadcast, (pthread_cond_t *cond), (cond), 0)
 FORWARD (pthread_cond_destroy, (pthread_cond_t *cond), (cond), 0)
-FORWARD (pthread_cond_init,
-        (pthread_cond_t *cond, const pthread_condattr_t *cond_attr),
-        (cond, cond_attr), 0)
 FORWARD (pthread_cond_signal, (pthread_cond_t *cond), (cond), 0)
 FORWARD (pthread_cond_wait, (pthread_cond_t *cond, pthread_mutex_t *mutex),
         (cond, mutex), 0)
index ae721f3a13eebd76b90352594de406945726bb44..051bc09e940a227ce33241e18252e83aef21a3f9 100644 (file)
@@ -29,7 +29,6 @@
 static const struct pthread_functions pthread_functions = {
   .ptr_pthread_cond_broadcast = __pthread_cond_broadcast,
   .ptr_pthread_cond_destroy = __pthread_cond_destroy,
-  .ptr_pthread_cond_init = __pthread_cond_init,
   .ptr_pthread_cond_signal = __pthread_cond_signal,
   .ptr_pthread_cond_wait = __pthread_cond_wait,
   .ptr_pthread_cond_timedwait = __pthread_cond_timedwait,
index 463e42cededc65500424332f3326807350a27243..73ca94e3b770bb8b69c1e97eb08b4d7f04006cab 100644 (file)
@@ -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
index 8ee01d3ff4af013516341537dbeee300b1a50864..87e75ca8044ec2e1952ce0a5ebbb689ebe9d554e 100644 (file)
@@ -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 *,
index adb81bc241f9a8f3ef502500a60b882b57dcf263..64c86623c7f1579330829b5b3d24d561aa6c7c24 100644 (file)
@@ -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);
index 3a63de6bbb907bcb242dc9982a0cd38ea5dde930..0992ea39113b1503cc955cf90989c6bfdb4637f1 100644 (file)
@@ -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;
index f4613aadac2bb46157dba010e3225bc85b1da493..d5520a06581c574022f5345d2ccbb156f808937d 100644 (file)
@@ -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
index e5b3edbed7673c0e23cd66d746f73deec4c34a28..77eddcfe939e32c7fa091f606b44a089208803cd 100644 (file)
@@ -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
index 89a63043545d630f768470eec8ddf78116f518ae..25bcc9dbea6d87484597e3b8ab308be0fb4e2f3a 100644 (file)
@@ -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