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

ruby-changes:26005

From: kosaki <ko1@a...>
Date: Fri, 30 Nov 2012 22:52:35 +0900 (JST)
Subject: [ruby-changes:26005] kosaki:r38062 (trunk): revert r35486 (add rb_thread_t#yeiling field). because it doesn't help

kosaki	2012-11-30 22:52:24 +0900 (Fri, 30 Nov 2012)

  New Revision: 38062

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38062

  Log:
    revert r35486 (add rb_thread_t#yeiling field). because it doesn't help
    to close a race.

  Modified files:
    trunk/ChangeLog
    trunk/thread.c
    trunk/vm_core.h

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38061)
+++ ChangeLog	(revision 38062)
@@ -10257,22 +10257,6 @@
 	* vm.c (m_core_hash_merge_kwd): merge keyword hash into intermediate
 	  hash.  leftward argument is prior currently.
 
-Sat Apr 28 18:39:40 2012  Koichi Sasada  <ko1@a...>
-
-	* vm_core.h (rb_thread_t#yielding): add a field.
-
-	* thread.c (rb_thread_schedule_limits): set th#yielding while
-	  release GVL to yield CPU time.
-
-	* thread.c (timer_thread_function): skip timer interrupt when
-	  th#yielding is true.  This patch fixes r35480.
-
-	* thread.c (rb_threadptr_execute_interrupts_common): revert
-	  a patch of r35480.
-
-	* ChangeLog: add an extended memo of r35480.
-	  http://bugs.ruby-lang.org/projects/ruby-trunk/wiki/R35480_ExtendedMemo
-
 Fri Apr 27 12:34:23 2012  NAKAMURA Usaku  <usa@r...>
 
 	* ext/dl/cfunc.c (rb_dlcfunc_call): should convert a Bignum value to
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 38061)
+++ vm_core.h	(revision 38062)
@@ -478,7 +478,6 @@
 
     /* passing state */
     int state;
-    int yielding;
 
     int waiting_fd;
 
Index: thread.c
===================================================================
--- thread.c	(revision 38061)
+++ thread.c	(revision 38062)
@@ -1047,10 +1047,8 @@
 
 	if (th->running_time_us >= limits_us) {
 	    thread_debug("rb_thread_schedule/switch start\n");
-	    th->yielding = 1;
 	    RB_GC_SAVE_MACHINE_CONTEXT(th);
 	    gvl_yield(th->vm, th);
-	    th->yielding = 0;
 	    rb_thread_set_current(th);
 	    thread_debug("rb_thread_schedule/switch done\n");
 	}
@@ -3635,9 +3633,7 @@
     rb_vm_t *vm = GET_VM(); /* TODO: fix me for Multi-VM */
 
     /* for time slice */
-    if (!vm->running_thread->yielding) {
-	RUBY_VM_SET_TIMER_INTERRUPT(vm->running_thread);
-    }
+    RUBY_VM_SET_TIMER_INTERRUPT(vm->running_thread);
 
     /* check signal */
     rb_threadptr_check_signal(vm->main_thread);

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

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