diff options
65 files changed, 93 insertions, 36 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 diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist index 9ab880c72a..dde11d1d0b 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist @@ -1494,6 +1494,7 @@ GLIBC_2.17 pthread_exit F GLIBC_2.17 pthread_getaffinity_np F GLIBC_2.17 pthread_getattr_np F GLIBC_2.17 pthread_getconcurrency F +GLIBC_2.17 pthread_getcpuclockid F GLIBC_2.17 pthread_getschedparam F GLIBC_2.17 pthread_getspecific F GLIBC_2.17 pthread_join F @@ -2367,6 +2368,7 @@ GLIBC_2.34 pthread_condattr_setpshared F GLIBC_2.34 pthread_detach F GLIBC_2.34 pthread_getattr_default_np F GLIBC_2.34 pthread_getconcurrency F +GLIBC_2.34 pthread_getcpuclockid F GLIBC_2.34 pthread_getspecific F GLIBC_2.34 pthread_join F GLIBC_2.34 pthread_key_create F diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist index ebd930eee5..9ac9be4ec4 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist @@ -1,6 +1,5 @@ GLIBC_2.17 __errno_location F GLIBC_2.17 pthread_create F -GLIBC_2.17 pthread_getcpuclockid F GLIBC_2.17 pthread_getname_np F GLIBC_2.17 pthread_setaffinity_np F GLIBC_2.17 pthread_setname_np F diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist index b99aa07295..0c3f66e309 100644 --- a/sysdeps/unix/sysv/linux/alpha/libc.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist @@ -2031,6 +2031,7 @@ GLIBC_2.2 pthread_barrierattr_init F GLIBC_2.2 pthread_barrierattr_setpshared F GLIBC_2.2 pthread_condattr_getpshared F GLIBC_2.2 pthread_condattr_setpshared F +GLIBC_2.2 pthread_getcpuclockid F GLIBC_2.2 pthread_mutex_timedlock F GLIBC_2.2 pthread_mutexattr_getpshared F GLIBC_2.2 pthread_mutexattr_setpshared F @@ -2457,6 +2458,7 @@ GLIBC_2.34 pthread_condattr_setpshared F GLIBC_2.34 pthread_detach F GLIBC_2.34 pthread_getattr_default_np F GLIBC_2.34 pthread_getconcurrency F +GLIBC_2.34 pthread_getcpuclockid F GLIBC_2.34 pthread_getspecific F GLIBC_2.34 pthread_join F GLIBC_2.34 pthread_key_create F diff --git a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist index 4f5f151530..ae50cb30c6 100644 --- a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist @@ -7,7 +7,7 @@ GLIBC_2.11 pthread_sigqueue F GLIBC_2.12 pthread_getname_np F GLIBC_2.12 pthread_setname_np F GLIBC_2.18 __libpthread_version_placeholder F -GLIBC_2.2 pthread_getcpuclockid F +GLIBC_2.2 __libpthread_version_placeholder F GLIBC_2.2.3 __libpthread_version_placeholder F GLIBC_2.2.6 __libpthread_version_placeholder F GLIBC_2.28 thrd_create F diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist index 4a4ae72dad..129040de57 100644 --- a/sysdeps/unix/sysv/linux/arc/libc.abilist +++ b/sysdeps/unix/sysv/linux/arc/libc.abilist @@ -1436,6 +1436,7 @@ GLIBC_2.32 pthread_getaffinity_np F GLIBC_2.32 pthread_getattr_default_np F GLIBC_2.32 pthread_getattr_np F GLIBC_2.32 pthread_getconcurre |
