summary refs log tree commit diff
path: root/nptl/pthread_getcpuclockid.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-17 09:59:14 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-17 10:25:11 +0200
commit310e59e64cbc95bff299825b2b7f38b88f82ba4e (patch)
treeab18cc279a1e63dcdc1b79a15e43ce8a2b775c3a /nptl/pthread_getcpuclockid.c
parente948be4db3ed254b6ba55d5250021f649a9a1c41 (diff)
downloadglibc-310e59e64cbc95bff299825b2b7f38b88f82ba4e.tar.gz
glibc-310e59e64cbc95bff299825b2b7f38b88f82ba4e.tar.xz
glibc-310e59e64cbc95bff299825b2b7f38b88f82ba4e.zip
nptl: Move pthread_getcpuclockid into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

__libpthread_version_placeholder@@GLIBC_2.2 is needed by this change;
the Versions entry for GLIBC_2.2 in libpthread had leftover symbols
due to an error in a previous conflict resolution.  The condition
for the placeholder symbol is complicated because some architectures
have earlier symbols at the GLIBC_2.2 symbol versions, so the
placeholder is not required there (yet).

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl/pthread_getcpuclockid.c')
-rw-r--r--nptl/pthread_getcpuclockid.c11
1 files changed, 9 insertions, 2 deletions
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