summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/thread.h6
-rw-r--r--thread.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/internal/thread.h b/internal/thread.h
index 91626b7..e7a9019 100644
--- a/internal/thread.h
+++ b/internal/thread.h
@@ -37,9 +37,11 @@ void rb_mutex_allow_trap(VALUE self, int val);
VALUE rb_uninterruptible(VALUE (*b_proc)(VALUE), VALUE data);
VALUE rb_mutex_owned_p(VALUE self);
-VALUE rb_thread_scheduler_get(VALUE);
-VALUE rb_thread_scheduler_set(VALUE, VALUE);
+VALUE rb_thread_scheduler_get(VALUE thread);
+VALUE rb_thread_scheduler_set(VALUE thread, VALUE scheduler);
+
VALUE rb_thread_scheduler_if_nonblocking(VALUE thread);
+VALUE rb_thread_current_scheduler();
RUBY_SYMBOL_EXPORT_BEGIN
/* Temporary. This API will be removed (renamed). */
diff --git a/thread.c b/thread.c
index 2f265c5..d10d411 100644
--- a/thread.c
+++ b/thread.c
@@ -3749,6 +3749,12 @@ rb_thread_scheduler(VALUE klass)
return rb_thread_scheduler_if_nonblocking(rb_thread_current());
}
+static VALUE
+rb_thread_current_scheduler()
+{
+ return rb_thread_scheduler_if_nonblocking(rb_thread_current());
+}
+
VALUE
rb_thread_scheduler_if_nonblocking(VALUE thread)
{