diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-05-17 09:59:14 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-05-17 10:25:12 +0200 |
commit | 8bc6a6d73c7f9004bfa3e81a717300e6d39ac448 (patch) | |
tree | 313572811e475ce4c17c2cf5df127df6b5a22952 /nptl/pthread_setname.c | |
parent | 7b300ec7f9a5a271f2169aa6e924184a41b3a9a8 (diff) | |
download | glibc-8bc6a6d73c7f9004bfa3e81a717300e6d39ac448.zip glibc-8bc6a6d73c7f9004bfa3e81a717300e6d39ac448.tar.gz glibc-8bc6a6d73c7f9004bfa3e81a717300e6d39ac448.tar.bz2 |
nptl: Move pthread_setname_np into libc
The symbol was moved using scripts/move-symbol-to-libc.py.
Add __libpthread_version_placeholder@@GLIBC_2.12 for the targets
that need it.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl/pthread_setname.c')
-rw-r--r-- | nptl/pthread_setname.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/nptl/pthread_setname.c b/nptl/pthread_setname.c index 61a39fb..6d2d8a1 100644 --- a/nptl/pthread_setname.c +++ b/nptl/pthread_setname.c @@ -28,7 +28,7 @@ int -pthread_setname_np (pthread_t th, const char *name) +__pthread_setname_np (pthread_t th, const char *name) { const struct pthread *pd = (const struct pthread *) th; @@ -40,7 +40,7 @@ pthread_setname_np (pthread_t th, const char *name) return ERANGE; if (pd == THREAD_SELF) - return prctl (PR_SET_NAME, name) ? errno : 0; + return __prctl (PR_SET_NAME, name) ? errno : 0; #define FMT "/proc/self/task/%u/comm" char fname[sizeof (FMT) + 8]; @@ -61,3 +61,10 @@ pthread_setname_np (pthread_t th, const char *name) return res; } +versioned_symbol (libc, __pthread_setname_np, pthread_setname_np, + GLIBC_2_34); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_34) +compat_symbol (libpthread, __pthread_setname_np, pthread_setname_np, + GLIBC_2_12); +#endif |