summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-27 12:59:08 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-27 12:59:08 +0000
commitd647b5358ed5c7f07b3aa500b40297568a882975 (patch)
treec61cc743feef2b607f5ac2850de0f15d3d49ceea
parentea3da57e1234b47f6c851d1760637fe627e9579d (diff)
* 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
-rw-r--r--ChangeLog5
-rw-r--r--thread_pthread.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7aafc6f972..3e48e9b16f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/thread_pthread.h b/thread_pthread.h
index e693fba299..f180a79d27 100644
--- a/thread_pthread.h
+++ b/thread_pthread.h
@@ -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 */