[master] 41cdd270f Deautocrap: everybody has a pthread_setname_np(2) now.

Poul-Henning Kamp phk at FreeBSD.org
Fri May 3 14:15:08 UTC 2024


commit 41cdd270f72a6972e050c38a0fabb05793044c29
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri May 3 13:12:13 2024 +0000

    Deautocrap: everybody has a pthread_setname_np(2) now.

diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c
index 13d209895..d29d3d3ae 100644
--- a/bin/varnishd/cache/cache_main.c
+++ b/bin/varnishd/cache/cache_main.c
@@ -134,9 +134,6 @@ THR_SetName(const char *name)
 {
 
 	PTOK(pthread_setspecific(name_key, name));
-#if defined(HAVE_PTHREAD_SET_NAME_NP)
-	pthread_set_name_np(pthread_self(), name);
-#elif defined(HAVE_PTHREAD_SETNAME_NP)
 #if defined(__APPLE__)
 	(void)pthread_setname_np(name);
 #elif defined(__NetBSD__)
@@ -144,7 +141,6 @@ THR_SetName(const char *name)
 #else
 	(void)pthread_setname_np(pthread_self(), name);
 #endif
-#endif
 }
 
 const char *
diff --git a/configure.ac b/configure.ac
index 92adda09c..2bd5b2800 100644
--- a/configure.ac
+++ b/configure.ac
@@ -231,8 +231,6 @@ AC_CHECK_FUNCS([fnmatch], [], [AC_MSG_ERROR([fnmatch(3) is required])])
 
 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_getattr_np])
 LIBS="${save_LIBS}"


More information about the varnish-commit mailing list