[前][次][番号順一覧][スレッド一覧]

ruby-changes:11827

From: nobu <ko1@a...>
Date: Mon, 18 May 2009 21:13:35 +0900 (JST)
Subject: [ruby-changes:11827] Ruby:r23482 (ruby_1_8): * ext/thread/thread.c (unlock_mutex_inner): should adjust join

nobu	2009-05-18 21:13:22 +0900 (Mon, 18 May 2009)

  New Revision: 23482

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23482

  Log:
    * ext/thread/thread.c (unlock_mutex_inner): should adjust join
      target here but not in wake_one.  a patch from John Carter at
      [ruby-core:23490].

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/ext/thread/thread.c
    branches/ruby_1_8/version.h

Index: ruby_1_8/ext/thread/thread.c
===================================================================
--- ruby_1_8/ext/thread/thread.c	(revision 23481)
+++ ruby_1_8/ext/thread/thread.c	(revision 23482)
@@ -231,7 +231,7 @@
 }
 
 static VALUE
-wake_first(List *list)
+wake_one(List *list)
 {
     VALUE waking;
 
@@ -244,22 +244,10 @@
 }
 
 static VALUE
-wake_one(List *list)
-{
-    VALUE waking = wake_first(list);
-
-    if (!NIL_P(waking)) {
-	adjust_join(list, waking);
-    }
-
-    return waking;
-}
-
-static VALUE
 wake_all(List *list)
 {
     while (list->entries) {
-        wake_first(list);
+        wake_one(list);
     }
     return Qnil;
 }
@@ -493,6 +481,9 @@
     }
 
     waking = wake_one(&mutex->waiting);
+    if (!NIL_P(waking)) {
+	adjust_join(list, waking);
+    }
     mutex->owner = waking;
 
     return waking;
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 23481)
+++ ruby_1_8/ChangeLog	(revision 23482)
@@ -1,3 +1,9 @@
+Mon May 18 21:13:19 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* ext/thread/thread.c (unlock_mutex_inner): should adjust join
+	  target here but not in wake_one.  a patch from John Carter a
+	  [ruby-core:23490].
+
 Sun May 17 23:29:33 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* Makefile.in (fake): prefixed with $(arch)-.
Index: ruby_1_8/version.h
===================================================================
--- ruby_1_8/version.h	(revision 23481)
+++ ruby_1_8/version.h	(revision 23482)
@@ -1,7 +1,7 @@
 #define RUBY_VERSION "1.8.8"
-#define RUBY_RELEASE_DATE "2009-05-17"
+#define RUBY_RELEASE_DATE "2009-05-18"
 #define RUBY_VERSION_CODE 188
-#define RUBY_RELEASE_CODE 20090517
+#define RUBY_RELEASE_CODE 20090518
 #define RUBY_PATCHLEVEL -1
 
 #define RUBY_VERSION_MAJOR 1
@@ -9,7 +9,7 @@
 #define RUBY_VERSION_TEENY 8
 #define RUBY_RELEASE_YEAR 2009
 #define RUBY_RELEASE_MONTH 5
-#define RUBY_RELEASE_DAY 17
+#define RUBY_RELEASE_DAY 18
 
 #ifdef RUBY_EXTERN
 RUBY_EXTERN const char ruby_version[];

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]