From 1976e3ffd9f898f52d39e514f733979ceb4c45f1 Mon Sep 17 00:00:00 2001 From: naruse Date: Fri, 21 Feb 2014 23:32:34 +0000 Subject: [PATCH] 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 --- ChangeLog | 7 +++++++ configure.in | 2 +- thread_pthread.c | 2 +- version.h | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a7883c7a3e..f856ed6601 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Feb 22 01:35:02 2014 Nobuyoshi Nakada + + * 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] + Sat Feb 22 00:21:50 2014 Nobuyoshi Nakada * parse.y (local_push_gen, local_pop_gen): save cmdarg_stack to diff --git a/configure.in b/configure.in index a920fd5675..17ed3edea3 100644 --- a/configure.in +++ b/configure.in @@ -2448,7 +2448,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 diff --git a/thread_pthread.c b/thread_pthread.c index 57daa3b45d..3e58ac5745 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -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 diff --git a/version.h b/version.h index 260d1a85b6..e352ebc6bf 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.1.1" #define RUBY_RELEASE_DATE "2014-02-22" -#define RUBY_PATCHLEVEL 49 +#define RUBY_PATCHLEVEL 50 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 2