From a9a2380cf01cdae519fdaf8ab021d486c8917e43 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 10 Nov 2016 02:26:09 +0100 Subject: nptl: add pthread_getname_np/pthread_setname_np from GNU libc These functions are used by firefox for example. Tested with running firefox on x86 system. --- libpthread/nptl/sysdeps/pthread/pthread.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libpthread/nptl/sysdeps/pthread') diff --git a/libpthread/nptl/sysdeps/pthread/pthread.h b/libpthread/nptl/sysdeps/pthread/pthread.h index 4103a06ad..b2897b3f2 100644 --- a/libpthread/nptl/sysdeps/pthread/pthread.h +++ b/libpthread/nptl/sysdeps/pthread/pthread.h @@ -428,6 +428,16 @@ extern int pthread_getschedparam (pthread_t __target_thread, extern int pthread_setschedprio (pthread_t __target_thread, int __prio) __THROW; +#ifdef __USE_GNU +/* Get thread name visible in the kernel and its interfaces. */ +extern int pthread_getname_np (pthread_t __target_thread, char *__buf, + size_t __buflen) + __THROW __nonnull ((2)); + +/* Set thread name visible in the kernel and its interfaces. */ +extern int pthread_setname_np (pthread_t __target_thread, const char *__name) + __THROW __nonnull ((2)); +#endif #if defined __USE_UNIX98 && defined __UCLIBC_SUSV4_LEGACY__ /* Determine level of concurrency. */ -- cgit v1.2.3