diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-07 16:21:02 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-07 16:21:02 +0000 |
commit | 65b76d92a4792b5960967b63f4c85dc6859bb807 (patch) | |
tree | 9f572223d01a3777f96e5c584755d2776caece27 /thread_pthread.c | |
parent | b494603551d1a6c8fbc56ba90a35451e84af4d2e (diff) |
merge revision(s) r45190,r45202,r45204,r45713: [Backport #9586]
configure.in: define SET_THREAD_NAME
* configure.in (SET_THREAD_NAME): define according to
pthread_setname_np variations.
* configure.in: correct pthread_setname_np's prototype on NetBSD.
[Bug #9586]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index aa8962a315..aa2c49e949 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -1422,11 +1422,9 @@ timer_thread_sleep(rb_global_vm_lock_t* unused) #endif /* USE_SLEEPY_TIMER_THREAD */ #if defined(__linux__) && defined(PR_SET_NAME) +# undef SET_THREAD_NAME # define SET_THREAD_NAME(name) prctl(PR_SET_NAME, name) -#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 +#elif !defined(SET_THREAD_NAME) # define SET_THREAD_NAME(name) (void)0 #endif |