about summary refs log tree commit diff
path: root/nptl/pthread_clockjoin.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-11 11:08:00 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-11 11:24:39 +0200
commitddd4a2d3c64642b34d95743db9032c2bb31c16b2 (patch)
treebfa7fb0ef9b4ba4cbf7412960ab665be2503db0c /nptl/pthread_clockjoin.c
parentdf65f897e9501aa5b64a5cbcb101301715f2ec2f (diff)
downloadglibc-ddd4a2d3c64642b34d95743db9032c2bb31c16b2.tar.gz
glibc-ddd4a2d3c64642b34d95743db9032c2bb31c16b2.tar.xz
glibc-ddd4a2d3c64642b34d95743db9032c2bb31c16b2.zip
nptl: Move thread join functions into libc
The symbols pthread_clockjoin_np, pthread_join, pthread_timedjoin_np,
pthread_tryjoin_np, thrd_join were moved using
scripts/move-symbol-to-libc.py.

Moving the symbols at the same time avoids the need for temporary
exports.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl/pthread_clockjoin.c')
-rw-r--r--nptl/pthread_clockjoin.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/nptl/pthread_clockjoin.c b/nptl/pthread_clockjoin.c
index 7457c187fe..f5007d7831 100644
--- a/nptl/pthread_clockjoin.c
+++ b/nptl/pthread_clockjoin.c
@@ -19,10 +19,12 @@
 #include <time.h>
 #include <futex-internal.h>
 #include "pthreadP.h"
+#include <shlib-compat.h>
 
 int
-__pthread_clockjoin_np64 (pthread_t threadid, void **thread_return,
-                          clockid_t clockid, const struct __timespec64 *abstime)
+___pthread_clockjoin_np64 (pthread_t threadid, void **thread_return,
+			   clockid_t clockid,
+			   const struct __timespec64 *abstime)
 {
   if (!futex_abstimed_supported_clockid (clockid))
     return EINVAL;
@@ -31,12 +33,14 @@ __pthread_clockjoin_np64 (pthread_t threadid, void **thread_return,
                                  clockid, abstime, true);
 }
 
-#if __TIMESIZE != 64
-libpthread_hidden_def (__pthread_clockjoin_np64)
+#if __TIMESIZE == 64
+strong_alias (___pthread_clockjoin_np64, ___pthread_clockjoin_np)
+#else /* __TIMESPEC64 != 64 */
+libc_hidden_ver (___pthread_clockjoin_np64, __pthread_clockjoin_np64)
 
 int
-__pthread_clockjoin_np (pthread_t threadid, void **thread_return,
-                        clockid_t clockid, const struct timespec *abstime)
+___pthread_clockjoin_np (pthread_t threadid, void **thread_return,
+			 clockid_t clockid, const struct timespec *abstime)
 {
   if (abstime != NULL)
     {
@@ -45,8 +49,13 @@ __pthread_clockjoin_np (pthread_t threadid, void **thread_return,
 				       &ts64);
     }
   else
-      return __pthread_clockjoin_np64 (threadid, thread_return, clockid,
-				       NULL);
+    return __pthread_clockjoin_np64 (threadid, thread_return, clockid,
+				     NULL);
 }
+#endif /* __TIMESPEC64 != 64 */
+versioned_symbol (libc, ___pthread_clockjoin_np, pthread_clockjoin_np,
+		  GLIBC_2_34);
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_31, GLIBC_2_34)
+compat_symbol (libpthread, ___pthread_clockjoin_np, pthread_clockjoin_np,
+	       GLIBC_2_31);
 #endif
-weak_alias (__pthread_clockjoin_np, pthread_clockjoin_np)