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 | c924e44acddc7b1e259da21ee101085006071cef (patch) | |
tree | ff36bdfdb252331c5358987795345033cbb6491d /nptl/pthread_getname.c | |
parent | 310e59e64cbc95bff299825b2b7f38b88f82ba4e (diff) | |
download | glibc-c924e44acddc7b1e259da21ee101085006071cef.tar.gz glibc-c924e44acddc7b1e259da21ee101085006071cef.tar.xz glibc-c924e44acddc7b1e259da21ee101085006071cef.zip |
nptl: Move pthread_getname_np into libc
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl/pthread_getname.c')
-rw-r--r-- | nptl/pthread_getname.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/nptl/pthread_getname.c b/nptl/pthread_getname.c index d796844e86..8ac814366a 100644 --- a/nptl/pthread_getname.c +++ b/nptl/pthread_getname.c @@ -23,12 +23,11 @@ #include <string.h> #include <unistd.h> #include <sys/prctl.h> - #include <not-cancel.h> - +#include <shlib-compat.h> int -pthread_getname_np (pthread_t th, char *buf, size_t len) +__pthread_getname_np (pthread_t th, char *buf, size_t len) { const struct pthread *pd = (const struct pthread *) th; @@ -39,7 +38,7 @@ pthread_getname_np (pthread_t th, char *buf, size_t len) return ERANGE; if (pd == THREAD_SELF) - return prctl (PR_GET_NAME, buf) ? errno : 0; + return __prctl (PR_GET_NAME, buf) ? errno : 0; #define FMT "/proc/self/task/%u/comm" char fname[sizeof (FMT) + 8]; @@ -67,3 +66,10 @@ pthread_getname_np (pthread_t th, char *buf, size_t len) return res; } +versioned_symbol (libc, __pthread_getname_np, pthread_getname_np, + GLIBC_2_34); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_34) +compat_symbol (libpthread, __pthread_getname_np, pthread_getname_np, + GLIBC_2_12); +#endif |