diff options
Diffstat (limited to 'sysdeps/pthread')
-rw-r--r-- | sysdeps/pthread/Makefile | 3 | ||||
-rw-r--r-- | sysdeps/pthread/thrd_exit.c | 11 |
2 files changed, 12 insertions, 2 deletions
diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile index 6f204ccab2..75a74be340 100644 --- a/sysdeps/pthread/Makefile +++ b/sysdeps/pthread/Makefile @@ -31,7 +31,7 @@ headers += threads.h routines += thrd_current thrd_equal thrd_sleep thrd_yield -libpthread-routines += thrd_create thrd_detach thrd_exit thrd_join \ +libpthread-routines += thrd_create thrd_detach thrd_join \ tss_create tss_delete tss_get tss_set $(libpthread-routines-var) += \ @@ -48,6 +48,7 @@ $(libpthread-routines-var) += \ mtx_timedlock \ mtx_trylock \ mtx_unlock \ + thrd_exit \ tests += tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \ tst-cnd-timedwait tst-thrd-detach tst-mtx-basic tst-thrd-sleep \ diff --git a/sysdeps/pthread/thrd_exit.c b/sysdeps/pthread/thrd_exit.c index 7348e83dcc..1554af422c 100644 --- a/sysdeps/pthread/thrd_exit.c +++ b/sysdeps/pthread/thrd_exit.c @@ -16,10 +16,19 @@ License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ +#include <shlib-compat.h> #include "thrd_priv.h" _Noreturn void -thrd_exit (int res) +__thrd_exit (int res) { __pthread_exit ((void*)(uintptr_t) res); } +#if PTHREAD_IN_LIBC +versioned_symbol (libc, __thrd_exit, thrd_exit, GLIBC_2_34); +# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34) +compat_symbol (libpthread, __thrd_exit, thrd_exit, GLIBC_2_28); +# endif +#else /* !PTHREAD_IN_LIBC */ +strong_alias (__thrd_exit, thrd_exit) +#endif |