about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/Versions7
-rw-r--r--nptl/libpthread-compat.c10
-rw-r--r--nptl/pthread_getcpuclockid.c11
4 files changed, 23 insertions, 7 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index a7c1932332..9c810b2b6c 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -116,6 +116,7 @@ routines = \
   pthread_getattr_default_np \
   pthread_getattr_np \
   pthread_getconcurrency \
+  pthread_getcpuclockid \
   pthread_getschedparam \
   pthread_getspecific \
   pthread_join \
@@ -206,7 +207,6 @@ libpthread-routines = \
   nptl-init \
   pt-interp \
   pthread_create \
-  pthread_getcpuclockid \
   pthread_getname \
   pthread_setaffinity \
   pthread_setname \
diff --git a/nptl/Versions b/nptl/Versions
index c76efffe37..9afbb028f2 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -127,6 +127,7 @@ libc {
     pthread_barrierattr_setpshared;
     pthread_condattr_getpshared;
     pthread_condattr_setpshared;
+    pthread_getcpuclockid;
     pthread_mutex_timedlock;
     pthread_mutexattr_getpshared;
     pthread_mutexattr_setpshared;
@@ -285,6 +286,7 @@ libc {
     pthread_detach;
     pthread_getattr_default_np;
     pthread_getconcurrency;
+    pthread_getcpuclockid;
     pthread_getspecific;
     pthread_join;
     pthread_key_create;
@@ -434,10 +436,7 @@ libpthread {
   }
 
   GLIBC_2.2 {
-    pthread_getcpuclockid;
-    pthread_yield;
-    pthread_rwlock_timedrdlock;
-    pthread_rwlock_timedwrlock;
+    __libpthread_version_placeholder;
   }
 
   GLIBC_2.2.3 {
diff --git a/nptl/libpthread-compat.c b/nptl/libpthread-compat.c
index c828fd8f9e..18069870d1 100644
--- a/nptl/libpthread-compat.c
+++ b/nptl/libpthread-compat.c
@@ -45,6 +45,16 @@ compat_symbol (libpthread, __libpthread_version_placeholder_1,
 	       __libpthread_version_placeholder, GLIBC_2_1_2);
 #endif
 
+/* Do not create the placeholder symbol version if there are other
+   symbols left that keep the version around (because GLIBC_2.0 got
+   promoted to GLIBC_2.2).  */
+#if SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_2_3) \
+  && ABI_libpthread_GLIBC_2_2 != ABI_libpthread_GLIBC_2_0 \
+  && ABI_libpthread_GLIBC_2_2 != ABI_libpthread_GLIBC_2_1_3
+compat_symbol (libpthread, __libpthread_version_placeholder_1,
+	       __libpthread_version_placeholder, GLIBC_2_2);
+#endif
+
 #if (SHLIB_COMPAT (libpthread, GLIBC_2_2_3, GLIBC_2_2_4))
 compat_symbol (libpthread, __libpthread_version_placeholder_1,
 	       __libpthread_version_placeholder, GLIBC_2_2_3);
diff --git a/nptl/pthread_getcpuclockid.c b/nptl/pthread_getcpuclockid.c
index ae7122cb5f..0a6656ea4c 100644
--- a/nptl/pthread_getcpuclockid.c
+++ b/nptl/pthread_getcpuclockid.c
@@ -21,10 +21,10 @@
 #include <sys/time.h>
 #include <tls.h>
 #include <kernel-posix-cpu-timers.h>
-
+#include <shlib-compat.h>
 
 int
-pthread_getcpuclockid (pthread_t threadid, clockid_t *clockid)
+__pthread_getcpuclockid (pthread_t threadid, clockid_t *clockid)
 {
   struct pthread *pd = (struct pthread *) threadid;
 
@@ -40,3 +40,10 @@ pthread_getcpuclockid (pthread_t threadid, clockid_t *clockid)
   *clockid = tidclock;
   return 0;
 }
+versioned_symbol (libc, __pthread_getcpuclockid, pthread_getcpuclockid,
+                  GLIBC_2_34);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34)
+compat_symbol (libpthread, __pthread_getcpuclockid, pthread_getcpuclockid,
+               GLIBC_2_2);
+#endif