summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-18 12:13:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-18 12:13:22 +0000
commit8dfd918d5b883d8c52acb501bf2164c157f8f91f (patch)
treef04d2bd7ab629cc5942c0c0d144c0695bf0eba57
parent746afd1d10917bb4091c94d85053d7beb1fe12a6 (diff)
* 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]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--ext/thread/thread.c19
-rw-r--r--version.h6
3 files changed, 14 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 7580503f65..d2bc622cce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon May 18 21:13:19 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* Makefile.in (fake): prefixed with $(arch)-.
diff --git a/ext/thread/thread.c b/ext/thread/thread.c
index b977fa77cf..eed74baeb8 100644
--- a/ext/thread/thread.c
+++ b/ext/thread/thread.c
@@ -231,7 +231,7 @@ run_thread(VALUE thread)
}
static VALUE
-wake_first(List *list)
+wake_one(List *list)
{
VALUE waking;
@@ -244,22 +244,10 @@ wake_first(List *list)
}
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 @@ unlock_mutex_inner(Mutex *mutex)
}
waking = wake_one(&mutex->waiting);
+ if (!NIL_P(waking)) {
+ adjust_join(list, waking);
+ }
mutex->owner = waking;
return waking;
diff --git a/version.h b/version.h
index a9e4c0e9fe..4d4b596719 100644
--- a/version.h
+++ b/version.h
@@ -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[];