ruby-changes:5992
From: usa <ko1@a...>
Date: Sat, 21 Jun 2008 16:48:46 +0900 (JST)
Subject: [ruby-changes:5992] Ruby:r17500 (trunk): * thread_win32.c (native_sleep): must block reentrance when accessing
usa 2008-06-21 16:48:29 +0900 (Sat, 21 Jun 2008)
New Revision: 17500
Modified files:
trunk/ChangeLog
trunk/thread_win32.c
Log:
* thread_win32.c (native_sleep): must block reentrance when accessing
th->unblock.
fixed [ruby-core:17341], reported by Bill Kelly <billk at cts.com>
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=17500&r2=17499&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/thread_win32.c?r1=17500&r2=17499&diff_format=u
Index: thread_win32.c
===================================================================
--- thread_win32.c (revision 17499)
+++ thread_win32.c (revision 17500)
@@ -229,8 +229,10 @@
{
DWORD ret;
+ native_mutex_lock(&th->interrupt_lock);
th->unblock.func = ubf_handle;
th->unblock.arg = th;
+ native_mutex_unlock(&th->interrupt_lock);
if (RUBY_VM_INTERRUPTED(th)) {
/* interrupted. return immediate */
@@ -241,8 +243,10 @@
thread_debug("native_sleep done (%lu)\n", ret);
}
+ native_mutex_lock(&th->interrupt_lock);
th->unblock.func = 0;
th->unblock.arg = 0;
+ native_mutex_unlock(&th->interrupt_lock);
}
GVL_UNLOCK_END();
th->status = prev_status;
Index: ChangeLog
===================================================================
--- ChangeLog (revision 17499)
+++ ChangeLog (revision 17500)
@@ -1,3 +1,9 @@
+Sat Jun 21 16:46:09 2008 NAKAMURA Usaku <usa@r...>
+
+ * thread_win32.c (native_sleep): must block reentrance when accessing
+ th->unblock.
+ fixed [ruby-core:17341], reported by Bill Kelly <billk at cts.com>
+
Sat Jun 21 16:29:02 2008 Nobuyoshi Nakada <nobu@r...>
* parse.y (call_args2, open_args): removed.
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/