diff options
author | Ivan Zhakov <ivan@apache.org> | 2023-01-21 16:13:27 +0000 |
---|---|---|
committer | Ivan Zhakov <ivan@apache.org> | 2023-01-21 16:13:27 +0000 |
commit | 9b4df62cd1117d6b4348c8a1f7871ece024eb413 (patch) | |
tree | 6b009aab810e5a22ec6ff0c167af99b0dd5e733e /build | |
parent | 545069e7dc77a47168c0667bd7080db008d402de (diff) | |
parent | 166a06a11e80a5479a806ebb5a213d1c3e547fc7 (diff) | |
download | apr-9b4df62cd1117d6b4348c8a1f7871ece024eb413.tar.gz |
Merge thread-name branch (PR 60587) [1]:
* Introduce apr_thread_name_set() and apr_thread_name_get().
[1] https://bz.apache.org/bugzilla/show_bug.cgi?id=60587
[2] https://lists.apache.org/thread/z24logzc6v8tc0p2q3375cc10qo9y5yw
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1906889 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build')
-rw-r--r-- | build/apr_threads.m4 | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/build/apr_threads.m4 b/build/apr_threads.m4 index 6895c3a67..98e17de1b 100644 --- a/build/apr_threads.m4 +++ b/build/apr_threads.m4 @@ -312,3 +312,27 @@ elif test "$apr_cv_mutex_robust_shared" = "np"; then [Define if non-posix/portable cross-process robust mutexes are available]) fi ]) + + +dnl Check for pthread_setname_np +dnl Note: Only detects two-arg version +AC_DEFUN([APR_CHECK_PTHREAD_SETNAME_NP], [ +AC_CACHE_CHECK([for pthread_setname_np support], +[apr_cv_pthread_setname_np], [ +AC_TRY_COMPILE([ +#include <pthread.h> +],[ +pthread_t td = pthread_self(); +pthread_setname_np(td, "name"); +],[ + apr_cv_pthread_setname_np=yes +],[ + apr_cv_pthread_setname_np=no +])]) + +if test "$apr_cv_pthread_setname_np" = "yes"; then + AC_DEFINE([HAVE_PTHREAD_SETNAME_NP], 1, + [Define if pthread_setname_np is available]) +fi +])dnl + |