merge revision(s) 44925: [Backport #9492]

* 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/branches/ruby_2_1@45090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2014-02-21 23:32:34 +00:00
parent 02cc3d942a
commit 1976e3ffd9
4 changed files with 10 additions and 3 deletions

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