1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

configure.in: use pthread_setname_np only if available

* configure.in: check if pthread_setname_np is available.
* thread_pthread.c: pthread_setname_np is not available on old
  Darwins.  [ruby-core:60524] [Bug #9492]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-02-13 02:06:36 +00:00
parent 75e1b5c845
commit bb7ae984f8
3 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,10 @@
Thu Feb 13 11:06:32 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in: check if pthread_setname_np is available.
* thread_pthread.c: pthread_setname_np is not available on old
Darwins. [ruby-core:60524] [Bug #9492]
Thu Feb 13 00:56:59 2014 Masaki Matsushita <glass.saga@gmail.com>
* configure.in: revert r44922. I should have used AC_CHECK_FUNCS()

View file

@ -2483,7 +2483,7 @@ if test x"$enable_pthread" = xyes; then
pthread_get_stackaddr_np pthread_get_stacksize_np \
thr_stksegment pthread_stackseg_np pthread_getthrds_np \
pthread_cond_init pthread_condattr_setclock pthread_condattr_init \
pthread_sigmask)
pthread_sigmask pthread_setname_np)
if test "${host_os}" = "nacl"; then
ac_cv_func_pthread_attr_init=no
else

View file

@ -1423,7 +1423,7 @@ timer_thread_sleep(rb_global_vm_lock_t* unused)
#if defined(__linux__) && defined(PR_SET_NAME)
# define SET_THREAD_NAME(name) prctl(PR_SET_NAME, name)
#elif defined(__APPLE__)
#elif defined(HAVE_PTHREAD_SETNAME_NP)
/* pthread_setname_np() on Darwin does not have target thread argument */
# define SET_THREAD_NAME(name) pthread_setname_np(name)
#else