about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-05 17:15:57 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-05 17:19:53 +0200
commit5633541d3b9a78fc5283af3a2f3e824126ef785a (patch)
tree2e05b6c9b7c90fa49f9e2a5b65296b58c8a9d2c4 /nptl
parent990c8ffd3a83232365f346413e394d4431875899 (diff)
downloadglibc-5633541d3b9a78fc5283af3a2f3e824126ef785a.tar.gz
glibc-5633541d3b9a78fc5283af3a2f3e824126ef785a.tar.xz
glibc-5633541d3b9a78fc5283af3a2f3e824126ef785a.zip
nptl: Move sem_trywait, sem_wait into libc
The symbols were 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/Versions10
-rw-r--r--nptl/sem_wait.c17
3 files changed, 20 insertions, 9 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 665cd1f3d1..7fb387a17a 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -160,6 +160,7 @@ routines = \
   sem_routines \
   sem_timedwait \
   sem_unlink \
+  sem_wait \
   tpp \
   unwind \
 
@@ -211,7 +212,6 @@ libpthread-routines = \
   pthread_sigqueue \
   pthread_timedjoin \
   pthread_tryjoin \
-  sem_wait \
   vars \
   version \
 
diff --git a/nptl/Versions b/nptl/Versions
index 20997aa706..b243e380e3 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -66,6 +66,8 @@ libc {
     sem_getvalue;
     sem_init;
     sem_post;
+    sem_trywait;
+    sem_wait;
   }
   GLIBC_2.1 {
     pthread_attr_init;
@@ -88,6 +90,8 @@ libc {
     sem_getvalue;
     sem_init;
     sem_post;
+    sem_trywait;
+    sem_wait;
   }
   GLIBC_2.1.1 {
     sem_close;
@@ -270,7 +274,9 @@ libc {
     sem_open;
     sem_post;
     sem_timedwait;
+    sem_trywait;
     sem_unlink;
+    sem_wait;
     thrd_exit;
     tss_create;
     tss_delete;
@@ -336,8 +342,6 @@ libpthread {
     pthread_detach;
     pthread_join;
     pthread_sigmask;
-    sem_trywait;
-    sem_wait;
   }
 
   GLIBC_2.1 {
@@ -350,8 +354,6 @@ libpthread {
     pthread_create;
     pthread_getconcurrency;
     pthread_setconcurrency;
-    sem_trywait;
-    sem_wait;
   }
 
   GLIBC_2.1.1 {
diff --git a/nptl/sem_wait.c b/nptl/sem_wait.c
index 02bee9f98c..8576add41c 100644
--- a/nptl/sem_wait.c
+++ b/nptl/sem_wait.c
@@ -43,9 +43,13 @@ __new_sem_wait (sem_t *sem)
     return __new_sem_wait_slow64 ((struct new_sem *) sem,
 				  CLOCK_REALTIME, NULL);
 }
-versioned_symbol (libpthread, __new_sem_wait, sem_wait, GLIBC_2_1);
+versioned_symbol (libc, __new_sem_wait, sem_wait, GLIBC_2_34);
 
-#if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1)
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_1, GLIBC_2_34)
+compat_symbol (libpthread, __new_sem_wait, sem_wait, GLIBC_2_1);
+#endif
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1)
 int
 attribute_compat_text_section
 __old_sem_wait (sem_t *sem)
@@ -80,8 +84,13 @@ __new_sem_trywait (sem_t *sem)
   __set_errno (EAGAIN);
   return -1;
 }
-versioned_symbol (libpthread, __new_sem_trywait, sem_trywait, GLIBC_2_1);
-#if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1)
+versioned_symbol (libc, __new_sem_trywait, sem_trywait, GLIBC_2_34);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_1, GLIBC_2_34)
+compat_symbol (libpthread, __new_sem_trywait, sem_trywait, GLIBC_2_1);
+#endif
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1)
 int
 __old_sem_trywait (sem_t *sem)
 {