aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2017-03-03 09:49:06 +0100
committerLukas Larsson <[email protected]>2017-03-03 09:49:06 +0100
commit7b419c0a38bd4dbc749621535a81d0d34f76ec57 (patch)
tree6df74a83b16aba1444ece5fd6db7c6a34ab12fbc /erts
parent369ef2ee5586e5cad2f16f0b8f956be011ba1550 (diff)
parent736fa5f5e53b76ee9caabdabfe0618c72cb73a02 (diff)
downloadotp-7b419c0a38bd4dbc749621535a81d0d34f76ec57.tar.gz
otp-7b419c0a38bd4dbc749621535a81d0d34f76ec57.tar.bz2
otp-7b419c0a38bd4dbc749621535a81d0d34f76ec57.zip
Merge branch 'lukas/erts/configure_option_to_threadnames/OTP-14232' into maint
* lukas/erts/configure_option_to_threadnames/OTP-14232: erts: Add configure option for setting threadnames
Diffstat (limited to 'erts')
-rw-r--r--erts/aclocal.m415
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