aboutsummaryrefslogtreecommitdiffstats
path: root/vm.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-04 08:19:28 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-04 08:19:28 +0000
commit563a7c85c71a4e01d3cb513cec97ed52c280bee7 (patch)
tree70638b1ee05d2c976ab58dd37a252350adffe0b0 /vm.c
parent5b8f2d81a8b28b66d0c3877a97b9a5145b2c8ae6 (diff)
downloadruby-563a7c85c71a4e01d3cb513cec97ed52c280bee7.tar.gz
refactoring r63073.
* cont.c (root_fiber_alloc): call `ConvertThreadToFiber()` here. `rb_fiber_t` for root_fiber is allocated before running Threads. Fiber objects wrapping this rb_fiber_t for root_fiber are created when root Fiber object is required explicitly (for example, Fiber switching and so on). We can put calling `ConvertThreadToFiber()`. In other words, we can pending `ConvertThreadToFiber()` until Fiber objects are created. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm.c b/vm.c
index df80bb94d3..1a57f2c6d1 100644
--- a/vm.c
+++ b/vm.c
@@ -2425,7 +2425,7 @@ rb_execution_context_mark(const rb_execution_context_t *ec)
}
void rb_fiber_mark_self(rb_fiber_t *fib);
-void rb_threadptr_root_fiber_setup_by_parent(rb_thread_t *th);
+void rb_threadptr_root_fiber_setup(rb_thread_t *th);
void rb_threadptr_root_fiber_release(rb_thread_t *th);
static void
@@ -2533,7 +2533,7 @@ static void
th_init(rb_thread_t *th, VALUE self)
{
th->self = self;
- rb_threadptr_root_fiber_setup_by_parent(th);
+ rb_threadptr_root_fiber_setup(th);
/* allocate thread stack */
#ifdef USE_SIGALTSTACK