summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 18170c8e16..242b48f15d 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -1540,6 +1540,17 @@ native_set_thread_name(rb_thread_t *th)
#endif
}
+static VALUE
+native_set_another_thread_name(rb_nativethread_id_t thread_id, VALUE name)
+{
+#ifdef SET_ANOTHER_THREAD_NAME
+ const char *s = "";
+ if (!NIL_P(name)) s = RSTRING_PTR(name);
+ SET_ANOTHER_THREAD_NAME(thread_id, s);
+#endif
+ return name;
+}
+
static void *
thread_timer(void *p)
{