aboutsummaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-13 08:49:10 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-13 08:49:10 +0000
commit92ca9f0696738fae28c50ab05d553946bc49cc96 (patch)
tree1a7c8883403df9e2d38c765cb448371d0ffbce4e /thread.c
parenta34ca0c98d7c57c0f92a1c3202207de09e35e94d (diff)
downloadruby-92ca9f0696738fae28c50ab05d553946bc49cc96.tar.gz
darwin can't set anothre thread's name
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/thread.c b/thread.c
index aedf73a102..5218ba7262 100644
--- a/thread.c
+++ b/thread.c
@@ -2748,18 +2748,6 @@ rb_thread_setname(VALUE thread, VALUE name)
pthread_setname_np(th->thread_id, RSTRING_PTR(name));
# elif defined(__NetBSD__)
pthread_setname_np(th->thread_id, RSTRING_PTR(name), "%s");
-#elif defined(__APPLE__)
- {
- int mib[2] = {CTL_KERN, KERN_THREADNAME};
- int r;
-# ifndef MAXTHREADNAMESIZE
-# define MAXTHREADNAMESIZE 64
-# endif
- int size_t len = RSTRING_LEN(name);
- if (len > MAXTHREADNAMESIZE-1) len = MAXTHREADNAMESIZE-1;
- r = sysctl(mib, 2, NULL, 0, RSTRING_PTR(name), len);
- if (!r) rb_sys_fail("sysctl([CTL_KERN, KERN_THREADNAME],..)");
- }
# endif
#elif defined(HAVE_PTHREAD_SET_NAME_NP) /* FreeBSD */
pthread_set_name_np(th->thread_id, RSTRING_PTR(name));