ruby-changes:32846
From: nobu <ko1@a...>
Date: Thu, 13 Feb 2014 11:06:46 +0900 (JST)
Subject: [ruby-changes:32846] nobu:r44925 (trunk): configure.in: use pthread_setname_np only if available
nobu 2014-02-13 11:06:36 +0900 (Thu, 13 Feb 2014) New Revision: 44925 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44925 Log: 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] Modified files: trunk/ChangeLog trunk/configure.in trunk/thread_pthread.c Index: configure.in =================================================================== --- configure.in (revision 44924) +++ configure.in (revision 44925) @@ -2483,7 +2483,7 @@ if test x"$enable_pthread" = xyes; then https://github.com/ruby/ruby/blob/trunk/configure.in#L2483 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 Index: ChangeLog =================================================================== --- ChangeLog (revision 44924) +++ ChangeLog (revision 44925) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Feb 13 11:06:32 2014 Nobuyoshi Nakada <nobu@r...> + + * 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@g...> * configure.in: revert r44922. I should have used AC_CHECK_FUNCS() Index: thread_pthread.c =================================================================== --- thread_pthread.c (revision 44924) +++ thread_pthread.c (revision 44925) @@ -1423,7 +1423,7 @@ timer_thread_sleep(rb_global_vm_lock_t* https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L1423 #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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/