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

ruby-changes:20201

From: kosaki <ko1@a...>
Date: Mon, 27 Jun 2011 21:59:20 +0900 (JST)
Subject: [ruby-changes:20201] kosaki:r32249 (trunk): * thread_pthread.h (rb_global_vm_lock_struct): add volatile to

kosaki	2011-06-27 21:59:08 +0900 (Mon, 27 Jun 2011)

  New Revision: 32249

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

  Log:
    * thread_pthread.h (rb_global_vm_lock_struct): add volatile to
      gvl->waiting. now thread_timer() access it w/o lock.

  Modified files:
    trunk/ChangeLog
    trunk/thread_pthread.h

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 32248)
+++ ChangeLog	(revision 32249)
@@ -1,3 +1,8 @@
+Mon Jun 27 21:29:50 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* thread_pthread.h (rb_global_vm_lock_struct): add volatile to
+	  gvl->waiting. now thread_timer() access it w/o lock.
+
 Mon Jun 27 21:16:11 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
 
 	* thread_pthread.c: s/__gvl_acquire/gvl_acquire_common/ and
Index: thread_pthread.h
===================================================================
--- thread_pthread.h	(revision 32248)
+++ thread_pthread.h	(revision 32249)
@@ -38,7 +38,7 @@
     pthread_mutex_t lock;
 
     /* slow path */
-    unsigned long waiting;
+    volatile unsigned long waiting;
     rb_thread_cond_t cond;
 
     /* yield */

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

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