Permalink
Browse files

* thread_pthread.h (rb_global_vm_lock_struct): add volatile to

  gvl->waiting. now thread_timer() access it w/o lock.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
1 parent ea3da57 commit d647b5358ed5c7f07b3aa500b40297568a882975 @kosaki kosaki committed Jun 27, 2011
Showing with 6 additions and 1 deletion.
  1. +5 −0 ChangeLog
  2. +1 −1 thread_pthread.h
View
@@ -1,3 +1,8 @@
+Mon Jun 27 21:29:50 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * 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@gmail.com>
* thread_pthread.c: s/__gvl_acquire/gvl_acquire_common/ and
View
@@ -38,7 +38,7 @@ typedef struct rb_global_vm_lock_struct {
pthread_mutex_t lock;
/* slow path */
- unsigned long waiting;
+ volatile unsigned long waiting;
rb_thread_cond_t cond;
/* yield */

0 comments on commit d647b53

Please sign in to comment.