ruby-changes:13970
From: nobu <ko1@a...>
Date: Mon, 16 Nov 2009 01:09:24 +0900 (JST)
Subject: [ruby-changes:13970] Ruby:r25777 (mvm): * thread.c (rb_thread_start_timer_thread),
nobu 2009-11-16 01:09:06 +0900 (Mon, 16 Nov 2009) New Revision: 25777 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25777 Log: * thread.c (rb_thread_start_timer_thread), thread_{pthread,win32}.c (native_stop_timer_thread): deal with working count. Index: thread.c =================================================================== --- thread.c (revision 25770) +++ thread.c (working copy) @@ -2814,5 +2814,5 @@ void rb_thread_start_timer_thread(void) { - system_working = 1; + system_working++; rb_thread_create_timer_thread(); } Index: thread_pthread.c =================================================================== --- thread_pthread.c (revision 25770) +++ thread_pthread.c (working copy) @@ -842,5 +842,5 @@ native_stop_timer_thread(void) int stopped; native_mutex_lock(&timer_thread_lock); - stopped = --system_working <= 0; + stopped = --system_working == 0; if (stopped) { native_cond_signal(&timer_thread_cond); Index: thread_win32.c =================================================================== --- thread_win32.c (revision 25770) +++ thread_win32.c (working copy) @@ -596,5 +596,5 @@ static int native_stop_timer_thread(void) { - int stopped = --system_working <= 0; + int stopped = --system_working == 0; if (stopped) { SetEvent(timer_thread_lock); Modified files: branches/mvm/ChangeLog branches/mvm/thread.c branches/mvm/thread_pthread.c branches/mvm/thread_win32.c Index: mvm/thread_win32.c =================================================================== --- mvm/thread_win32.c (revision 25776) +++ mvm/thread_win32.c (revision 25777) @@ -600,7 +600,7 @@ static int native_stop_timer_thread(void) { - int stopped = --system_working <= 0; + int stopped = --system_working == 0; if (stopped) { SetEvent(timer_thread_lock); native_thread_join(timer_thread_id); Index: mvm/ChangeLog =================================================================== --- mvm/ChangeLog (revision 25776) +++ mvm/ChangeLog (revision 25777) @@ -1,5 +1,9 @@ -Mon Nov 16 01:06:50 2009 Nobuyoshi Nakada <nobu@r...> +Mon Nov 16 01:08:58 2009 Nobuyoshi Nakada <nobu@r...> + * thread.c (rb_thread_start_timer_thread), + thread_{pthread,win32}.c (native_stop_timer_thread): deal with + working count. + * thread_pthread.c (native_cond_timedwait): use timeval instead of timespec. Index: mvm/thread_pthread.c =================================================================== --- mvm/thread_pthread.c (revision 25776) +++ mvm/thread_pthread.c (revision 25777) @@ -844,7 +844,7 @@ { int stopped; native_mutex_lock(&timer_thread_lock); - stopped = --system_working <= 0; + stopped = --system_working == 0; if (stopped) { native_cond_signal(&timer_thread_cond); } Index: mvm/thread.c =================================================================== --- mvm/thread.c (revision 25776) +++ mvm/thread.c (revision 25777) @@ -2813,7 +2813,7 @@ void rb_thread_start_timer_thread(void) { - system_working = 1; + system_working++; rb_thread_create_timer_thread(); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/