summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--ext/thread/thread.c13
2 files changed, 6 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 6bb5176b67..bd4a043e63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
Tue Feb 27 03:40:09 2007 Akinori MUSHA <knu@iDaemons.org>
+ * ext/thread/thread.c (set_critical): Merge in
+ thread_exclusive_ensure().
+
* ext/thread/thread.c: Consistently use 0 and 1 for
rb_thread_critical values.
diff --git a/ext/thread/thread.c b/ext/thread/thread.c
index bf84a390c6..7142459d83 100644
--- a/ext/thread/thread.c
+++ b/ext/thread/thread.c
@@ -18,6 +18,8 @@ static VALUE rb_cConditionVariable;
static VALUE rb_cQueue;
static VALUE rb_cSizedQueue;
+static VALUE set_critical(VALUE value);
+
static VALUE
thread_exclusive_do()
{
@@ -26,15 +28,6 @@ thread_exclusive_do()
return rb_yield(Qundef);
}
-static VALUE
-thread_exclusive_ensure(val)
- VALUE val;
-{
- rb_thread_critical = val;
-
- return Qundef;
-}
-
/*
* call-seq:
* Thread.exclusive { block } => obj
@@ -456,7 +449,7 @@ static VALUE
set_critical(VALUE value)
{
rb_thread_critical = (int)value;
- return Qnil;
+ return Qundef;
}
static VALUE