From 82e6d95edc047cf39ac3e3c5f388c5624a35d77a Mon Sep 17 00:00:00 2001 From: kosaki Date: Tue, 14 Jun 2011 16:31:23 +0000 Subject: * thread_pthread.c (gvl_yield): fix live lock issue on 1-2 cpus system. It's additional fix for r32021. * thread_pthread.c (gvl_init): add switch_wait_cond. * thread_pthread.h (typedef struct rb_global_vm_lock_struct): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread_pthread.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'thread_pthread.h') diff --git a/thread_pthread.h b/thread_pthread.h index 781712c3f6..3167efc050 100644 --- a/thread_pthread.h +++ b/thread_pthread.h @@ -45,7 +45,9 @@ typedef struct rb_global_vm_lock_struct { /* yield */ rb_thread_cond_t switch_cond; - unsigned long need_yield; + rb_thread_cond_t switch_wait_cond; + int need_yield; + int wait_yield; } rb_global_vm_lock_t; #endif /* RUBY_THREAD_PTHREAD_H */ -- cgit v1.2.1