diff options
author | Lukas Larsson <[email protected]> | 2016-10-06 17:01:09 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2017-02-22 15:30:00 +0100 |
commit | 736fa5f5e53b76ee9caabdabfe0618c72cb73a02 (patch) | |
tree | f1c8e1932abb6cce0e15262d7ff7473fccd2099a /erts | |
parent | 8f0cfd160505e5ac6c100db7d1294c2e63dc0cbb (diff) | |
download | otp-736fa5f5e53b76ee9caabdabfe0618c72cb73a02.tar.gz otp-736fa5f5e53b76ee9caabdabfe0618c72cb73a02.tar.bz2 otp-736fa5f5e53b76ee9caabdabfe0618c72cb73a02.zip |
erts: Add configure option for setting threadnames
Diffstat (limited to 'erts')
-rw-r--r-- | erts/aclocal.m4 | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/erts/aclocal.m4 b/erts/aclocal.m4 index 5ea4c2ccf3..80bf236188 100644 --- a/erts/aclocal.m4 +++ b/erts/aclocal.m4 @@ -1524,6 +1524,13 @@ ETHR_LIB_NAME= ethr_modified_default_stack_size= +AC_ARG_WITH(threadnames, +AS_HELP_STRING([--with-threadnames], [use pthread_setname to set the thread names (default)]) +AS_HELP_STRING([--without-threadnames], + [do not set any thread names]), +[], +[with_threadnames=yes]) + dnl Name of lib where ethread implementation is located ethr_lib_name=ethread @@ -1914,12 +1921,12 @@ case "$THR_LIB_NAME" in [pthread_setname_np("name");], pthread_setname=darwin) AC_MSG_RESULT([$pthread_setname]) - case $pthread_setname in - linux) AC_DEFINE(ETHR_HAVE_PTHREAD_SETNAME_NP_2, 1, + case $with_threadnames-$pthread_setname in + yes-linux) AC_DEFINE(ETHR_HAVE_PTHREAD_SETNAME_NP_2, 1, [Define if you have linux style pthread_setname_np]);; - bsd) AC_DEFINE(ETHR_HAVE_PTHREAD_SET_NAME_NP_2, 1, + yes-bsd) AC_DEFINE(ETHR_HAVE_PTHREAD_SET_NAME_NP_2, 1, [Define if you have bsd style pthread_set_name_np]);; - darwin) AC_DEFINE(ETHR_HAVE_PTHREAD_SETNAME_NP_1, 1, + yes-darwin) AC_DEFINE(ETHR_HAVE_PTHREAD_SETNAME_NP_1, 1, [Define if you have darwin style pthread_setname_np]);; *) ;; esac |