diff options
Diffstat (limited to 'cont.c')
-rw-r--r-- | cont.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -851,6 +851,12 @@ NOINLINE(static VALUE cont_capture(volatile int *volatile stat)); if (!(th)->ec->tag) rb_raise(rb_eThreadError, "not running thread"); \ } while (0) +rb_thread_t* +rb_fiber_threadptr(const rb_fiber_t *fiber) +{ + return fiber->cont.saved_ec.thread_ptr; +} + static VALUE cont_thread_value(const rb_context_t *cont) { @@ -1146,6 +1152,11 @@ cont_new(VALUE klass) return cont; } +VALUE rb_fiberptr_self(struct rb_fiber_struct *fiber) +{ + return fiber->cont.self; +} + void rb_fiber_init_mjit_cont(struct rb_fiber_struct *fiber) { |