From ddd4a2d3c64642b34d95743db9032c2bb31c16b2 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 11 May 2021 11:08:00 +0200 Subject: 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 --- nptl/pthread_timedjoin.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'nptl/pthread_timedjoin.c') diff --git a/nptl/pthread_timedjoin.c b/nptl/pthread_timedjoin.c index f5d0d3d6ce..ebc31f935a 100644 --- a/nptl/pthread_timedjoin.c +++ b/nptl/pthread_timedjoin.c @@ -18,21 +18,24 @@ #include #include "pthreadP.h" +#include int -__pthread_timedjoin_np64 (pthread_t threadid, void **thread_return, - const struct __timespec64 *abstime) +___pthread_timedjoin_np64 (pthread_t threadid, void **thread_return, + const struct __timespec64 *abstime) { return __pthread_clockjoin_ex (threadid, thread_return, CLOCK_REALTIME, abstime, true); } -#if __TIMESIZE != 64 -libpthread_hidden_def (__pthread_timedjoin_np64) +#if __TIMESIZE == 64 +strong_alias (___pthread_timedjoin_np64, ___pthread_timedjoin_np) +#else /* __TIMESPEC64 != 64 */ +libc_hidden_ver (___pthread_timedjoin_np64, __pthread_timedjoin_np64) int -__pthread_timedjoin_np (pthread_t threadid, void **thread_return, - const struct timespec *abstime) + ___pthread_timedjoin_np (pthread_t threadid, void **thread_return, + const struct timespec *abstime) { if (abstime != NULL) { @@ -42,5 +45,10 @@ __pthread_timedjoin_np (pthread_t threadid, void **thread_return, else return __pthread_timedjoin_np64 (threadid, thread_return, NULL); } +#endif /* __TIMESPEC64 != 64 */ +versioned_symbol (libc, ___pthread_timedjoin_np, pthread_timedjoin_np, + GLIBC_2_34); +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_3_3, GLIBC_2_34) +compat_symbol (libpthread, ___pthread_timedjoin_np, pthread_timedjoin_np, + GLIBC_2_3_3); #endif -weak_alias (__pthread_timedjoin_np, pthread_timedjoin_np) -- cgit v1.2.3