mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
ea3da57e12
commit
d647b5358e
2 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue