aboutsummaryrefslogtreecommitdiffstats
path: root/cont.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-06 08:22:27 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-06 08:22:27 +0000
commit297c5975f232f508e7ed5d81fc6c48bcc354b298 (patch)
tree125c393bfd21cafcccd5cdc4f89469c2f7c72ca9 /cont.c
parent1096d702ed9e4cbc26499fe3749acc7f3609da8f (diff)
downloadruby-297c5975f232f508e7ed5d81fc6c48bcc354b298.tar.gz
use `GET_EC()` directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cont.c b/cont.c
index 6f9d76ecd1..cebb7a28de 100644
--- a/cont.c
+++ b/cont.c
@@ -1503,11 +1503,11 @@ rb_threadptr_root_fiber_release(rb_thread_t *th)
static inline rb_fiber_t*
fiber_current(void)
{
- rb_thread_t *th = GET_THREAD();
- if (th->ec->fiber_ptr->cont.self == 0) {
- root_fiber_alloc(th);
+ rb_execution_context_t *ec = GET_EC();
+ if (ec->fiber_ptr->cont.self == 0) {
+ root_fiber_alloc(rb_ec_thread_ptr(ec));
}
- return th->ec->fiber_ptr;
+ return ec->fiber_ptr;
}
static inline rb_fiber_t*