Commit 83aa5402 authored by Lasse Karstensen's avatar Lasse Karstensen

Use correct function for setting thread name.

Correct typo that checked for pthread_set_name_np() instead of
pthread_setname_np().

Thread names should now be visible in /proc/CHILDPID/tasks/*/comm on
Linux systems.
parent 77fec1b0
......@@ -92,8 +92,8 @@ THR_SetName(const char *name)
{
AZ(pthread_setspecific(name_key, name));
#ifdef HAVE_PTHREAD_SET_NAME_NP
pthread_set_name_np(pthread_self(), name);
#ifdef HAVE_PTHREAD_SETNAME_NP
pthread_setname_np(pthread_self(), name);
#endif
}
......
......@@ -287,7 +287,7 @@ exit 0
# HAVE_DLADDR +
# HAVE_KQUEUE +
# HAVE_NANOSLEEP +
# HAVE_PTHREAD_SET_NAME_NP +
# HAVE_PTHREAD_SETNAME_NP +
# HAVE_SETPROCTITLE +
# HAVE_SRANDOMDEV +
# HAVE_TCP_KEEP +
......
......@@ -248,7 +248,7 @@ AC_CHECK_FUNCS([fallocate])
save_LIBS="${LIBS}"
LIBS="${PTHREAD_LIBS}"
AC_CHECK_FUNCS([pthread_set_name_np])
AC_CHECK_FUNCS([pthread_setname_np])
AC_CHECK_FUNCS([pthread_mutex_isowned_np])
AC_CHECK_FUNCS([pthread_timedjoin_np])
LIBS="${save_LIBS}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment