summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-04-23 11:00:53 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-04-23 11:00:53 +0200
commit2a775a9ea574957248e333595a35a75e43c946dc (patch)
treeef8f23d93b47bfdf5cea75869ef96601fcadaf75 /nptl
parented00dcbbd695fedfc60591da24b3555db03b3dd9 (diff)
downloadglibc-2a775a9ea574957248e333595a35a75e43c946dc.tar.gz
glibc-2a775a9ea574957248e333595a35a75e43c946dc.tar.xz
glibc-2a775a9ea574957248e333595a35a75e43c946dc.zip
nptl: Move pthread_condattr_getpshared into libc
The symbol was moved using scripts/move-symbol-to-libc.py.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/Versions3
-rw-r--r--nptl/pthread_condattr_getpshared.c11
3 files changed, 12 insertions, 4 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index b7903bdc33..a1571a0990 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -81,6 +81,7 @@ routines = \
   pthread_cond_wait \
   pthread_condattr_destroy \
   pthread_condattr_getclock \
+  pthread_condattr_getpshared \
   pthread_condattr_init \
   pthread_equal \
   pthread_exit \
@@ -163,7 +164,6 @@ libpthread-routines = \
   pthread_barrierattr_setpshared \
   pthread_cancel \
   pthread_clockjoin \
-  pthread_condattr_getpshared \
   pthread_condattr_setclock \
   pthread_condattr_setpshared \
   pthread_create \
diff --git a/nptl/Versions b/nptl/Versions
index 962f3ae1dc..d6ee40b5bb 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -74,6 +74,7 @@ libc {
     __pthread_rwlock_rdlock;
     __pthread_rwlock_unlock;
     __pthread_rwlock_wrlock;
+    pthread_condattr_getpshared;
     pthread_mutex_timedlock;
     pthread_mutexattr_getpshared;
     pthread_mutexattr_setpshared;
@@ -149,6 +150,7 @@ libc {
     __pthread_setspecific;
     pthread_cond_clockwait;
     pthread_condattr_getclock;
+    pthread_condattr_getpshared;
     pthread_getspecific;
     pthread_key_create;
     pthread_key_delete;
@@ -301,7 +303,6 @@ libpthread {
     pthread_barrierattr_destroy;
     pthread_barrierattr_init;
     pthread_barrierattr_setpshared;
-    pthread_condattr_getpshared;
     pthread_condattr_setpshared;
     pthread_getcpuclockid;
     pthread_rwlock_timedrdlock;
diff --git a/nptl/pthread_condattr_getpshared.c b/nptl/pthread_condattr_getpshared.c
index 9d88aaafb5..46974b0f9d 100644
--- a/nptl/pthread_condattr_getpshared.c
+++ b/nptl/pthread_condattr_getpshared.c
@@ -17,13 +17,20 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include "pthreadP.h"
-
+#include <shlib-compat.h>
 
 int
-pthread_condattr_getpshared (const pthread_condattr_t *attr, int *pshared)
+__pthread_condattr_getpshared (const pthread_condattr_t *attr, int *pshared)
 {
   *pshared = (((const struct pthread_condattr *) attr)->value & 1
 	      ? PTHREAD_PROCESS_SHARED : PTHREAD_PROCESS_PRIVATE);
 
   return 0;
 }
+versioned_symbol (libc, __pthread_condattr_getpshared,
+		  pthread_condattr_getpshared, GLIBC_2_34);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34)
+compat_symbol (libpthread, __pthread_condattr_getpshared,
+	       pthread_condattr_getpshared, GLIBC_2_2);
+#endif