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

ruby-changes:48657

From: nobu <ko1@a...>
Date: Wed, 15 Nov 2017 14:50:18 +0900 (JST)
Subject: [ruby-changes:48657] nobu:r60773 (trunk): thread.c: use ec

nobu	2017-11-15 14:50:10 +0900 (Wed, 15 Nov 2017)

  New Revision: 60773

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

  Log:
    thread.c: use ec
    
    * thread.c (call_without_gvl): use execution context for
      RUBY_VM_CHECK_INTS_BLOCKING.

  Modified files:
    trunk/thread.c
Index: thread.c
===================================================================
--- thread.c	(revision 60772)
+++ thread.c	(revision 60773)
@@ -1309,8 +1309,8 @@ call_without_gvl(void *(*func)(void *), https://github.com/ruby/ruby/blob/trunk/thread.c#L1309
 		 rb_unblock_function_t *ubf, void *data2, int fail_if_interrupted)
 {
     void *val = 0;
-
-    rb_thread_t *th = GET_THREAD();
+    rb_execution_context_t *ec = GET_EC();
+    rb_thread_t *th = rb_ec_thread_ptr(ec);
     int saved_errno = 0;
 
     if (ubf == RUBY_UBF_IO || ubf == RUBY_UBF_PROCESS) {
@@ -1324,7 +1324,7 @@ call_without_gvl(void *(*func)(void *), https://github.com/ruby/ruby/blob/trunk/thread.c#L1324
     }, ubf, data2, fail_if_interrupted);
 
     if (!fail_if_interrupted) {
-	RUBY_VM_CHECK_INTS_BLOCKING(th->ec);
+	RUBY_VM_CHECK_INTS_BLOCKING(ec);
     }
 
     errno = saved_errno;

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

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