[前][次][番号順一覧][スレッド一覧]

ruby-changes:48558

From: ko1 <ko1@a...>
Date: Mon, 6 Nov 2017 17:22:31 +0900 (JST)
Subject: [ruby-changes:48558] ko1:r60673 (trunk): use `GET_EC()` directly.

ko1	2017-11-06 17:22:27 +0900 (Mon, 06 Nov 2017)

  New Revision: 60673

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60673

  Log:
    use `GET_EC()` directly.

  Modified files:
    trunk/cont.c
Index: cont.c
===================================================================
--- cont.c	(revision 60672)
+++ cont.c	(revision 60673)
@@ -1503,11 +1503,11 @@ rb_threadptr_root_fiber_release(rb_threa https://github.com/ruby/ruby/blob/trunk/cont.c#L1503
 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*

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]