summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 */